UITextView resignFirstResponder If isFirstResponder
Sometimes you need to know if a UITextView is activly being edited. Here is a simple snippet to check if a UITextView is the first responder if it is then resign it. This will dismiss the keyboard and cancel editing of the UITextView.
if([myTextView isFirstResponder])[myTextView resignFirstResponder];