CustomTableCellView's implementation of -layoutSubviews needs to call super , NSInternalInconsistencyException

后端 未结 2 1301
离开以前
离开以前 2021-01-18 02:03

On using autoLayout in custom cell for tableView xib, i am getting following error.

When running in iOS 6 simulator CustomCells\'s implementation o

2条回答
  •  太阳男子
    2021-01-18 02:09

    layoutSubviews needs to call super
    

    Can be worked around on iOS6 by putting everything in your custom tableview cell in a container view. ie Create a new view to fill the cell then place controls etc inside that. Also make sure you set:

    [theContainerView setTranslatesAutoresizingMaskIntoConstraints:NO]; 
    

    for the container and subviews

提交回复
热议问题