- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// 页面appear 禁用
[IQKeyboardManager sharedManager].enable = NO;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// 页面Disappear 启用
[IQKeyboardManager sharedManager].enable = YES;
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// 页面appear 禁用
[IQKeyboardManager sharedManager].enableAutoToolbar = NO;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// 页面Disappear 启用
[IQKeyboardManager sharedManager].enableAutoToolbar = YES;
}
typedef NS_ENUM(NSUInteger, IQPreviousNextDisplayMode) {
// 默认一界面多输入框显示切换箭头 单输入框不显示
IQPreviousNextDisplayModeDefault,
// 隐藏切换箭头
IQPreviousNextDisplayModeAlwaysHide,
// 一直显示切换箭头(不受输入框个数限制)
IQPreviousNextDisplayModeAlwaysShow,
};
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// 页面appear 禁用
[IQKeyboardManager sharedManager].previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysHide;
}
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// 页面Disappear 启用
[IQKeyboardManager sharedManager].previousNextDisplayMode = IQPreviousNextDisplayModeAlwaysShow;
}