不知道大家有没有出现过 cell 上属性不现实的状况,今天遇到了,在网上查找了一下,记录下来。
UITableViewCell 在初始化时,style;
if (!cell) {
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIndentify];
}
typedef NS_ENUM(NSInteger, UITableViewCellStyle) {
UITableViewCellStyleDefault,
UITableViewCellStyleValue1,
UITableViewCellStyleValue2,
UITableViewCellStyleSubtitle
};
当style样式不同时,就会显示不同属性:
特举例子:cell 为UITableViewCellStyleSubtitle 样式时;
显示属性:detailTextLable .
本文介绍了UITableView中的UITableViewCell在不同样式下所展现的不同属性。特别针对UITableViewCellStyleSubtitle样式进行了详细解析,包括如何设置此样式的cell以及它所具有的detailTextLabel等特定属性。
265

被折叠的 条评论
为什么被折叠?



