Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-01-2008, 07:51 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 2
Default UI Elements , keypad, keyboard?

Hello,
I am new to interface builder, and just wanted to check the following:
1) Is it possible to add a keypad user interface element to
my application? Like the one you see when you're on a call,
with the list of digits 0-9. Is this something which I need to
code myself, or is there such a thing as a keypad ui
element that I can just add to a view?

2) Also, I wonder is it possible to extend apple's keyboard, so
it has like a TAB key, Control-C key etc. I guess that's gonna
be really hard to do.

Thanks,
Astro
astropaul is offline   Reply With Quote
Old 08-01-2008, 08:08 PM   #2 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 802
Default

You don't add the keyboard in interface builder. it automatically comes up with you have a textfield that is the first responder in your view.

There are some predefined keyboard types that you can select from.

Look up UIKeyboardType in the docs. You can change the return button.
scottiphone is offline   Reply With Quote
Old 08-01-2008, 10:59 PM   #3 (permalink)
Lost in a sea of code
 
BostonMerlin's Avatar
 
Join Date: Apr 2008
Location: Boston
Posts: 399
Default

for a given textview use interface builder to change the type of keyboard that is displayed when the user gives it focus (if not adding programatically that is). you'll also need to read up on how cancel the keyboard once it's opened as the keyboard doesn't automatically close when it loses focus. you'll hit your head on the desk a few times wondering why that darn thing doesn't just close as you would expect it to.

hope that helps
john
__________________
----------------------------------------------------------------------
I love being a dad, flying airplanes and writing code.
----------------------------------------------------------------------
Follow me on Twitter: @BostonMerlin
Feed your brain on Twitter: @iPhoneDev101
----------------------------------------------------------------------
iPhone Apps:
BostonMerlin is offline   Reply With Quote
Old 08-02-2008, 12:35 PM   #4 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 15
Default

>> you'll hit your head on the desk a few times wondering why that darn thing doesn't just close as you would expect it to.

>> john


After suffering brain damage from the as mentioned head-hitting-desk scenario, I learned that in your "textFieldShouldReturn" function your should "resignFirstResponder" on your UITextField object.

Nice pretty keyboard goes away.

-M
melii1983 is offline   Reply With Quote
Old 08-02-2008, 01:47 PM   #5 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 420
Send a message via AIM to jeff_lamarche Send a message via Yahoo to jeff_lamarche
Default

Quote:
I learned that in your "textFieldShouldReturn" function your should "resignFirstResponder" on your UITextField object.
Another way to handle this is to put the resignFirstResponder code in an action method and connect the text field's Did End on Exit event to it, which doesn't require you to become the text field's delegate. If I don't need to be the text field's delegate for any other reason, I prefer this method, but both should work just fine.
__________________
Check out my iPhone Dev Blog
You can send me e-mail at my forum username at mac dot com.
jeff_lamarche is offline   Reply With Quote
Old 08-15-2009, 05:57 AM   #6 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 9
Default

Quote:
Originally Posted by melii1983 View Post
>> you'll hit your head on the desk a few times wondering why that darn thing doesn't just close as you would expect it to.

>> john


After suffering brain damage from the as mentioned head-hitting-desk scenario, I learned that in your "textFieldShouldReturn" function your should "resignFirstResponder" on your UITextField object.

Nice pretty keyboard goes away.

-M
anyway you can provide a sample or link to the answer? im hitting my head right now too. where is the textfieldshouldreturn function? do you have to create it yourself in the controller.h file? and how do you call the resignfirstresponder for the UITextField object?
Davecg is offline   Reply With Quote
Reply

Bookmarks

Tags
keyboard, keypad

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 250
16 members and 234 guests
@sandris, ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:56 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0