Has anything changed with custom UITableView prototype cells constraints since iOS 8.3?

感情迁移 提交于 2020-01-03 13:43:26

问题


I have recently installed iOS 8.3 on my iPhone (I had iOS 8.1 before).

I also updated the iOS SDK from iOS 8.1 to iOS 8.3.

Since I updated it some custom prototype cells I had seem to be misplaced.

Has anything changed from iOS 8.1 to iOS 8.3 regarding the way constraints are handled?


EDIT:

I tried the solution suggested but does not work for me. Will add more details on my cells in few seconds.

I added this to the custom cell class:

-(void) updateConstraints{
    [super updateConstraints];

    [self addConstraint:[NSLayoutConstraint constraintWithItem:self.contentView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeading multiplier:1.0f constant:0.0f]];
}

This is the way it used to look:

This is the way it looks:


回答1:


I've noticed at least 1 discrepancy, and the talk around my issue seems to reveal more: iOS 8.3 - UITableView cell not aligned, indentation to the left



来源:https://stackoverflow.com/questions/29824830/has-anything-changed-with-custom-uitableview-prototype-cells-constraints-since-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!