IPhone - Keyboard Return button not responding | Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

IPhone - Keyboard Return button not responding

Monday

How to hide keyboard for UITextView with return key?-IPhone:
                                            The following three simple steps is used to dismiss the keyboard for UITextView while clicking return key.
Step:1
         Subscribe to the UITextFieldDelegate Protocol in your View/ViewController's header file like:           
       @interface
YourViewController : UIViewController <UITextFieldDelegate>


Step:2
        Setyour view/viewcontroller to be the UITextField's delegate after you init the textfield in the .m:
        yourTextField
.delegate = self;
Sterp:3
        Then in your .m file you need to implement the following UITextFieldDelegate protocol method:

        - (BOOL)textFieldShouldReturn:(UITextField *)theTextField
           {
              [theTextField resignFirstResponder];
              return YES;
           }
That's all.  If this post was useful to you please send your valuable comments

0 comments:

Post a Comment

Share your thoughts here...

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets