UITableViewCell subclass layout messed up in autoLayout-disabled Storyboard

后端 未结 1 1208
借酒劲吻你
借酒劲吻你 2021-01-16 10:12

I have created a table view with prototype cells in a Storyboard with the \"Use Autolayout\" unchecked in Xcode 5.

The cells are UITableViewCell subclasses, mainly t

相关标签:
1条回答
  • 2021-01-16 11:04

    The cell is getting modified by the undocumented UITableViewCell's layoutSubviews:

    • Despite set not no autoresize subviews, the default implementation changes the backgroundView frame.
    • It also moves imageView (the ">") to the left despite being configured as a Custom Style cell.

    Thus avoiding executing super's layoutSubviews fixes it.

    0 讨论(0)
提交回复
热议问题