1.在摸个界面完全禁用IQKeyboard
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//TODO: 页面appear 禁用
[[IQKeyboardManager sharedManager] setEnable:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
//TODO: 页面Disappear 启用
[[IQKeyboardManager sharedManager] setEnable:YES];
}
2.在摸个界面完全禁用IQKeyboard 的 Toolbar (完成、切换箭头)
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//TODO: 页面appear 禁用
[[IQKeyboardManager sharedManager] setEnableAutoToolbar:NO];
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
//TODO: 页面Disappear 启用
[[IQKeyboardManager sharedManager] setEnableAutoToolbar:YES];
}
3.在摸个界面完全禁用IQKeyboard 的 Toolbar 的 切换箭头(切换输入框)
typedef NS_ENUM(NSUInteger, IQPreviousNextDisplayMode) {
IQPreviousNextDisplayModeDefault, 默认一界面多输入框显示切换箭头 单输入框不显示
IQPreviousNextDisplayModeAlwaysHide, 隐藏切换箭头
IQPreviousNextDisplayModeAlwaysShow, 一直显示切换箭头(不受输入框个数限制)
};
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//TODO: 页面appear 禁用
[IQKeyboardManager sharedManager] .previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysHide;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
//TODO: 页面Disappear 启用
[IQKeyboardManager sharedManager] .previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysShow;
}