Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>-(IBAction) finEdition: (id)sender is method for Button not for textfield [sender resignFirstResponder];sender is id of Button/ViewController try to resign first responder so application get crashed </p> <pre><code> -(IBAction) finEdition: (id)sender { [self.textfield1 resignFirstResponder]; [self.textfield2 resignFirstResponder]; ... ... ... [self.textfieldn resignFirstResponder]; } </code></pre> <p>//here this is delegate method of UITextField so you can use [theTextField resignFirstResponder];</p> <pre><code>- (BOOL)textFieldShouldReturn:(UITextField *)theTextField { [theTextField resignFirstResponder]; return YES; } </code></pre> <p>It is your application’s responsibility to dismiss the keyboard at the time of your choosing. You might dismiss the keyboard in response to a specific user action, such as the user tapping a particular button in your user interface. You might also configure your text field delegate to dismiss the keyboard when the user presses the “return” key on the keyboard itself. To dismiss the keyboard, send the resignFirstResponder message to the text field that is currently the first responder. Doing so causes the text field object to end the current editing session (with the delegate object’s consent) and hide the keyboard.</p> <p>So, you have to send resignFirstResponder somehow. But there is a possibility that textfield loses focus another way during processing of textFieldShouldReturn: message. This also will cause keyboard to disappear.<br> Make sure you're setting your view/viewcontroller to be the UITextField's delegate after you init the textfield in the .m:</p> <p>yourTextField.delegate = self;</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload