ios - Is it possible to assign two different selectors to keyboard return and keyboard hide keys in ipad using objective c -


I want to call a function when the keyboard return key is pressed and I call another function call when the keyboard focus key is pressed I want to do the iPad. So I need to check that the return key is pressed or the key is pressed.

You can test for UITextField delegates by using previous methods ...

  // Edit - TextFieldDidBeginEditing: - textFieldShowEndEditing: - textFieldDidEndEditing: // text field text editing - textField: ChangeCharactersInRange: ReplaceString: - textFieldShouldClear: - textFieldShouldReturn:  

- textFieldShouldReturn: method only when calls The user clicks the return button in the keyboard. It will not call the user after clicking on the hide key ... can check by u. Only implemented for "UIKeyboardWillHideNotification":

  [[NSNotificationCenter defaultCenter] addObserver: auto selector: @selector (KeyboardWillHide :) Name: UIKeyboardWillHideNotification Object: Zero];  

Hope it helps.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -