IOS中UITabelView常用属性

  1. 分隔线属性

a)       separatorStyle 分隔线样式

b)      separatorColor 分隔线颜色

  1. 选中属性

a)       allowsSelection 允许选中

b)      allowsMultipleSelection 允许多选

  1. 行数

a)       indexPathsForSelectedRows 当前选中行数

b)      indexPathsForVisibleRows 当前可见行数

  1. 背景

a)       backgroundView    背景视图

b)      selectedBackgroundView 选中时的背景视图

  1. 另外,UITableViewCell的selectionStyle属性可设置被选中时的背景颜色:

a)       UITableViewCellSelectionStyleNone  没有颜色

b)      UITableViewCellSelectionStyleBlue  蓝色(默认)

c)       UITableViewCellSelectionStyleGray  灰色

原文地址:https://www.cnblogs.com/changxs/p/3342076.html