一、出现问题场景
初始化UITextView,设置frame位当前控制器view的bounds大小,点击TextView导航栏出现上移问题.
二、解决方法
- (void)viewWillAppear:(BOOL)animated {
[superviewWillAppear:animated];
[IQKeyboardManager sharedManager].enable =NO;
}
- (void)viewWillDisappear:(BOOL)animated {
[superviewWillDisappear:animated];
[IQKeyboardManager sharedManager].enable =YES;
}
以亲测,问题已解决,方法简单有效.