Hey guys, I was wondering if it was possible to implement a method which resigns the FirstResponder of the UITextView when you press the done button.
yes of course: just call the method when the button is pressed, link the uitextviewptr to the text view . ... IBOutlet UITextView *uitextviewptr ; @property (retain,nonatomic) IBOutlet UITextView *uitextviewptr ; ... @synthesize uitextviewptr ; -(IBAction) do_done: (id)sender { [uitextviewptr resignFirstResponder ]; }
Hmm, I'm pretty sure that method is for UIButtons. What I want is when you press the Done key on the keyboard.
can i ask why? text view is usually for multiline text and return key has a purpose to insert line breaks. if you are not doing multiline scrolling text you dont need a textVIEW. and if you use uitextfield you can implement its delegate method for when the return key was pressed.
Okay, then does anyone know how to make a UITextfield extend itself as the text becomes longer like in the text application? I've seen a tutorial for it somewhere but can't seem to find it...