Monday 15 August 2011

iphone - UITextView has no events -


I'm developing an iPhone application for which to capture some text, a multi-text text field (UITextView) is needed.

When the user touches the text then it becomes the first responder and displays the keyboard. What do I need to do, remove the keyboard when the user finishes? Normally a return / made button with a text field will signal the end of the typing typing and I will first use the representative to resign the respondent. However, with a multimedia text view I want the user to add a new line so that it is not possible.

The first responder will have to resign when my next option is to touch up outside the reader's view. The problem here is that there are no events declared on UITextView that I can see in the interface builder.

How can I create a multilay text field in an iPhone app that will release the first reaction at a specific time, the user is done with it?

You can use a full button on the navigation bar:

 < Code> - (zero) viewDidoadload [[Super Viewedload]; Self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone Target: Self Operation: @selector (doneAction :)]; }  

To dismiss the keyboard, handle events like this:

  - (zero) action done: (ID) Sender { [TextView resignFirstResponder]; }  

(Remember the .h file announcement)


No comments:

Post a Comment