禁用IQKeyboardManager

IQKeyboardManager现在用isEnabled = false根本无法禁止,用isEnableAutoToolbar = false才有效;
但是如果没有isEnabled = false,那么通知中心监控到的键盘高度还是包含了IQKeyboardManager的inputAccessoryView。所以必须写两行代码去禁用!

override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        //MMP的要两句同时写才能完全禁止,否则通知中心监控到的键盘高度还是包含IQKeyboardManager的inputAccessoryView
        IQKeyboardManager.shared().isEnabled = false
        IQKeyboardManager.shared().isEnableAutoToolbar = false
    }

你可能感兴趣的:(禁用IQKeyboardManager)