Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - if UITextView is editing in if statement

I know that I can check if the UITextView is editing using textViewDidBeginEditing: but I want to check if it is editing using if statement is there is anyway to do that?

like image 922
AFB Avatar asked Feb 22 '14 14:02

AFB


1 Answers

Use the method isFirstResponder, e.g.:

if ([myTextView isFirstResponder]){
    // do something...
}
like image 64
bobnoble Avatar answered Sep 19 '22 19:09

bobnoble