我最近在我的 iPhone 上安装了 iOS 8.3(我之前安装过 iOS 8.1)。
我还将 iOS SDK 从 iOS 8.1 更新到了 iOS 8.3。
自从我更新它以来,我的一些自定义原型(prototype)单元似乎放错了地方。
从 iOS 8.1 到 iOS 8.3,处理约束的方式有什么变化吗?
<小时/>编辑:
我尝试了建议的解决方案,但对我不起作用。将在几秒钟内添加有关我的单元格的更多详细信息。
我将其添加到自定义单元类中:
-(void) updateConstraints{
[super updateConstraints];
[self addConstraint:[NSLayoutConstraint constraintWithItem:self.contentView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeading multiplier:1.0f constant:0.0f]];
}
这是它以前的样子:
这就是它的样子:
最佳答案
我注意到至少有 1 个差异,围绕我的问题的讨论似乎揭示了更多:iOS 8.3 - UITableView cell not aligned, indentation to the left
关于iphone - 自 iOS 8.3 以来,自定义 UITableView 原型(prototype)单元格约束有什么变化吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29824830/