PDA

View Full Version : Need help: I can't find out how to make the textfield keyboard close.




ausername
Mar 10, 2009, 06:58 PM
Hello, I am new to the the UIKit and objective-c in general. The problem I am having is that when I click on a test field, the keyboard opens, respectively. But when I click the "Done" button, the keyboard does not close. How can I close the keyboard?



North Bronson
Mar 10, 2009, 07:29 PM
You want to use the TextField's delegate.

Do you understand how delegation works? Delegation is used throughout UIKit (and Cocoa), so it would be very useful to understand how it all works.

ausername
Mar 10, 2009, 07:43 PM
Not really. Is there a way to do it without one? or could you show me how to do it with one?

fenrus110
Mar 10, 2009, 08:03 PM
Hello, I am new to the the UIKit and objective-c in general. The problem I am having is that when I click on a test field, the keyboard opens, respectively. But when I click the "Done" button, the keyboard does not close. How can I close the keyboard?

Just because you are new, doesn't mean you are excused from reading the documentation.

http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/TextandWeb/chapter_7_section_3.html#//apple_ref/doc/uid/TP40007072-CH20-SW3

ausername
Mar 10, 2009, 08:08 PM
Well, that is true, didn't know they had any info on that. Well. Thanks for the link. :)