问题
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