UITableViewCell 单元格样式

时间:2023-03-10 03:28:40
UITableViewCell 单元格样式

UITableViewCell 单元格样式作用

 typedef NS_ENUM(NSInteger, UITableViewCellStyle) {
UITableViewCellStyleDefault, // Simple cell with text label and optional image view (behavior of UITableViewCell in iPhoneOS 2.x)
UITableViewCellStyleValue1, // Left aligned label on left and right aligned label on right with blue text (Used in Settings)
UITableViewCellStyleValue2, // Right aligned label on left with blue text and left aligned label on right (Used in Phone/Contacts)
UITableViewCellStyleSubtitle // Left aligned label on top and left aligned label on bottom with gray text (Used in iPod).
}; // available in iPhone OS 3.0

UITableViewCellStyleDefault 默认类型 可显示 标题+可选图像

UITableViewCellStyleValue1                      (图像占大格标题在和明细处于同一行 文字堆叠) 标题+明细+图像

UITableViewCellStyleValue2        不显示图像,标题+明细 文字变亮蓝色

UITableViewCellStyleSubtitle        (图像占大格标题在上明细在下)标题+明细+图像