iPhone: Resign Keyboard with Done button action with XIB

后端 未结 4 854
执笔经年
执笔经年 2020-12-21 00:38

hi i am working on UITextview

how to Resign Keyboard, after keyboard \"Done button\" click Action, which XIB

Thank you

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-21 01:39

    Create an IBAction and in IB hook it up to the UITextfield's DidEndOnExit event. Then call the [textViewName resignFirstResponder] to make the keyboard go away.

    Alternatively, try using [self.view endEditing:YES] in the IBAction.

提交回复
热议问题