自iOS 8.3以来,自定义UITableView原型单元约束是否发生了任何变化? [英] Has anything changed with custom UITableView prototype cells constraints since iOS 8.3?

查看:120
本文介绍了自iOS 8.3以来,自定义UITableView原型单元约束是否发生了任何变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在iPhone上安装了iOS 8.3(之前装有iOS 8.1).

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

我还将iOS SDK从iOS 8.1更新到了iOS 8.3.

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.

关于约束处理方式,是否从iOS 8.1更改为iOS 8.3?

我尝试了建议的解决方案,但不适用于我.会在几秒钟内为我的手机添加更多详细信息.

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]];
}

这是它过去的样子:

这是它的外观:

推荐答案

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

这篇关于自iOS 8.3以来,自定义UITableView原型单元约束是否发生了任何变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆