gpt4 book ai didi

iphone - 自 iOS 8.3 以来,自定义 UITableView 原型(prototype)单元格约束有什么变化吗?

转载 作者:行者123 更新时间:2023-12-03 19:01:53 24 4
gpt4 key购买 nike

我最近在我的 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]];
}

这是它以前的样子:

enter image description here

这就是它的样子:

enter image description here

最佳答案

我注意到至少有 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com