UITableViewWrapperView and UITableView size differs with autolayout

后端 未结 7 2008
一生所求
一生所求 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

    I was facing the same issue on tvOS 11.3, and neither of suggestions related with zero insets or scroll disable did the job, except looping through tableView's subviews and setting the UITableViewWrapperView's frame to the tableView's frame.

        override func viewDidAppear(_ animated: Bool) {
            super.viewDidAppear(animated)
            for view in tableView.subviews {
                if String(describing: type(of: view)) == "UITableViewWrapperView" {
                    view.frame = CGRect(x: 0, y: 0, width: tableView.bounds.size.width, height: tableView.bounds.size.height)
            }
        }
    }
    

提交回复
热议问题