0
  • In my application I have one uiview.
  • I am adding another subview to this view which contains one textfield.
  • when user clicks that field then it display the keypad.
  • This subview also contains one add and delete button.

    • when user clicks on that button another view is opened which is also the subview of main view and that view contains selection list in the table.
  • The problem here is when user types something in textfield so keyboard is open.

  • if user does not dismiss that keyboard and clicks on add button to select from selection list then only half of the selection list is visible because keyboard is still open. I want to send the keyboard back.

  • Here i do not want to dismiss the keyborad.while user clicks the add button.i only want to send it back to the selection view.when user is done with selection view keyboard should be open as it is.How can i solve this issue?

iosdev1111
  • 1,048
  • 1
  • 13
  • 32

1 Answers1

0

If you want the keyboard to go away, you need to dismiss it when they click on the button by using [yourTextField resignFirstResponder];.

If you want it to come back when they select an item, you will need to call [yourTextField becomeFirstResponder];.

lnafziger
  • 25,760
  • 8
  • 60
  • 101