SNKeyboardManager is a extend of UITextField/UITextView, you can control the keyboard event with a boolean property of UITextFiled/UITextView automatically and conviniently.
#####Tap or pan any blank area to turn off the keyboard:
_textField.sn_keyboardManagerEnabled = YES;
_textView.sn_keyboardManagerEnabled = YES;
#####Adjust the position of view when keyboard is showing or dismissing:
_textField.sn_autoAdjustFrameEnabled = YES;
iOS 7.0+.
SNKeyboardManager is licensed under the MIT License.