草庐IT

userRatingsAbbreviatedTextCell

全部标签

ios - 调用 heightForRowAtIndexPath 时 UITableViewCell 的 contentView 宽度不同 :

我正在尝试计算使用自动布局布局的表格View单元格的高度。由于这也必须与iOS7兼容,因此我需要为heightForRowAtIndexPath:返回一个有效高度。我正在做的是:if(self.userRatingsAbbreviatedTextCell==nil){self.userRatingsAbbreviatedTextCell=[[UserRatingsAbbreviatedTextCellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:nil];}[self.userRatingsAbbrevia