UITableViewCell 显示类别

来源:互联网 发布:adb安装软件命令 编辑:程序博客网 时间:2024/04/29 14:27

不知道大家有没有出现过 cell 上属性不现实的状况,今天遇到了,在网上查找了一下,记录下来。

UITableViewCell 在初始化时,style;

if (!cell) {

        cell = [[UITableViewCellalloc]initWithStyle:UITableViewCellStyleSubtitlereuseIdentifier:cellIndentify];

    }


其style :

typedef NS_ENUM(NSInteger, UITableViewCellStyle) {

    UITableViewCellStyleDefault,

    UITableViewCellStyleValue1,

    UITableViewCellStyleValue2, 

    UITableViewCellStyleSubtitle

};  

当style样式不同时,就会显示不同属性:

特举例子:cell 为UITableViewCellStyleSubtitle 样式时;

显示属性:detailTextLable .



           



0 0
原创粉丝点击