UITableViewCell 相关设置

1. 字体大小:html

UITableViewCellStyleSubtitle:ide

textLabel: Helvetica Bold, size: labelFontSize+1 (18 px)
detailsLabel: Helvetica, size: systemFontSize (14 px)字体

UITableViewCellStyleValue1:ui

textLabel: Helvetica Bold, size: labelFontSize (17 px)
detailsLabel: Helvetica Bold, size: systemFontSize+1 (15 px)spa

UITableViewCellStyleValue2:.net

textLabel: Helvetica Bold, size: smallSystemFontSize (12 px)
detailsLabel: Helvetica, size: labelFontSize (17 px)code

设置大小时,用 [UIFont SystemFontofSize:] 或者 [UIFont BoldSystemFontofSize:]htm

2. 不一样样式的显示效果:blog

                

3. 自定义 cell:get

         

 

4. accessoryType:

对于 UITableViewCell 而言,其 accessoryType属性有4种取值:

cell.accessoryType = UITableViewCellAccessoryNone;//cell没有任何的样式

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;//cell的右边有一个小箭头,距离右边有十几像素;

cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;//cell右边有一个蓝色的圆形button;

cell.accessoryType = UITableViewCellAccessoryCheckmark;//cell右边的形状是对号;

除此以外,若是你想使用自定义附件按钮的其余样式,必需使用UITableView 的 accessoryView 属性。 

5. 

相关文章
相关标签/搜索