Re: IB question
Re: IB question
- Subject: Re: IB question
- From: Dave Carrigan <email@hidden>
- Date: Mon, 6 Sep 2010 11:29:41 -0700
On Sep 6, 2010, at 11:20 AM, Luca Ciciriello wrote:
>
> Sorry if my question is very stupid, but I'm really a beginner.
>
> In the iOS sdk 4.0.2 I'm using a UITextField object. The description of this object in IB is:
>
> "Displays a rounded rectangle that can contain editable text. When a user taps a text field, a keyboard appears; when a user taps Return in the keyboard, the keyboard disappears and the text field can handle the input in an application-specific way"
>
> My problem is that in the simulator, tapping Return the keyboard doesn't disappear. What I'm doing wrong?
I think that the description is inaccurate, because I get the same behavior as you. If you want the keyboard to disappear, you should make your view controller the text field's delegate, and then implement -textFieldShouldReturn: and call -resignFirstResponder inside that method.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >IB question (From: Luca Ciciriello <email@hidden>) |