Detect Start and Stop Editing UITextView

后端 未结 4 1725
名媛妹妹
名媛妹妹 2021-02-06 22:39

How can I call some code upon entering a UITextView (user taps to edit it) and leaving the view (user taps to leave it)?

Appreciate any help.

4条回答
  •  遥遥无期
    2021-02-06 23:42

    use the delegate and use:

    - (void) textViewDidBeginEditing:(UITextView *) textView {
        // Your code here
    }
    

提交回复
热议问题