UITableViewWrapperView and UITableView size differs with autolayout

后端 未结 7 2069
一生所求
一生所求 2020-12-28 16:38

I am building a chat. Everything seem to be quite ok but I bumped into sort of \'buggy\' problem.

i got UIViewController with UITextView bar for entering message and

7条回答
  •  梦谈多话
    2020-12-28 17:03

    In iOS 11 UITableViewWrapperView has gone, so this problem may occur only on later iOS versions. I faced it on iOS10 when I pushed custom UIViewController in UINavigationController stack.

    So, the solution is to override property automaticallyAdjustsScrollViewInsets in custom view controller like this:

    override var automaticallyAdjustsScrollViewInsets: Bool {
        get {
            return false
        }
        set {
    
        }
    }
    

提交回复
热议问题