美文网首页swift
UITabbar push 下页面的布局bug

UITabbar push 下页面的布局bug

作者: 秋叶红90 | 来源:发表于2019-12-18 14:26 被阅读0次

UITabbar push下个页面 ,界面布局有所改变, 尽可能的布局 都在 页面出现之后更新 约束

 override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        //更新约束 比如您的键盘弹出事件 
    }

IQKeyboardManager 也有可能是这家伙影响的

 override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        //更新约束 比如您的键盘弹出事件
   let shareKeyBoard = IQKeyboardManager.shared
        shareKeyBoard.enable = ture 
    }

 override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        let shareKeyBoard = IQKeyboardManager.shared
        shareKeyBoard.enable = false
        if !self.isHiedKeyBoard{
            
            self.inputTextView.becomeFirstResponder()
        }
    }

相关文章

网友评论

    本文标题:UITabbar push 下页面的布局bug

    本文链接:https://www.haomeiwen.com/subject/rnhunctx.html