What is a 'UIView-Encapsulated-Layout-Width' constraint?

前端 未结 5 845
旧时难觅i
旧时难觅i 2020-12-14 00:14

I keep getting \'Unable to simultaneously satisfy constraints\' exceptions (Xcode 5, iOS 7, both device and simulator), where one of the constraints in the list is something

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 00:34

    I found this with iOS 10 builds where I was using UITableViewCell subclasses as normal views not as table rows. The cell was constraining its contentView to zero width.

    The workaround I used was to just add the contentView to the view hierarchy instead of the tableview cell. I also made sure to retain the tableView cell (as it was no longer being retained by the view hierarchy itself).

提交回复
热议问题