我将 Xcode 与 Swift 1.2 一起更新到 6.3,并完成了转换。
除了表视图的动态行高之外,一切正常。我在 3 个完全不同的表视图上有这些,所以它可能不是影响该错误的其他因素。
我将所有表视图设置为:
tableView.rowHeight = UITableViewAutomaticDimension
我的所有 xib 文件都受到适当的约束。
有任何想法吗?
我只是将 UITableViewAutomaticDimension 添加到estimatedrowforindexpath 中。您可以在BEAM App http://beam.biz/app(在“人”类别下)。
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewAutomaticDimension;
}
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewAutomaticDimension;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)