修改tableView侧栏索引的背景色
2016-03-31 15:53
309 查看
tableView侧栏索引的背景色默认是白色,但是可以通过以下属性修改
1.修改index文字颜色
@property (nonatomic,
strong, nullable)
UIColor *sectionIndexColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR; // color used for text of the section index
2.修改背景色
@property (nonatomic,
strong,
nullable) UIColor *sectionIndexBackgroundColor
NS_AVAILABLE_IOS(7_0)
UI_APPEARANCE_SELECTOR;
// the background color of the section index while not being touched
3.修改点击后的背景色
@property (nonatomic,
strong,
nullable) UIColor *sectionIndexTrackingBackgroundColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// the background color of the section index while it is being touched
例如:
//将背景色改为透明
_historyPropertyTableView.sectionIndexBackgroundColor = [UIColor
clearColor];
1.修改index文字颜色
@property (nonatomic,
strong, nullable)
UIColor *sectionIndexColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR; // color used for text of the section index
2.修改背景色
@property (nonatomic,
strong,
nullable) UIColor *sectionIndexBackgroundColor
NS_AVAILABLE_IOS(7_0)
UI_APPEARANCE_SELECTOR;
// the background color of the section index while not being touched
3.修改点击后的背景色
@property (nonatomic,
strong,
nullable) UIColor *sectionIndexTrackingBackgroundColor
NS_AVAILABLE_IOS(6_0)
UI_APPEARANCE_SELECTOR;
// the background color of the section index while it is being touched
例如:
//将背景色改为透明
_historyPropertyTableView.sectionIndexBackgroundColor = [UIColor
clearColor];
相关文章推荐
- Android Studio 导入项目说明
- Using Multiple Android Studio Versions
- java中的事件监听器和观察者模式
- Tomcat之——Context []startup failed due to previous errors有效解决方式
- VSYNC由显示器发出
- WinDbg x86下查看SSDT SSSDT
- 两款监控工具Procmon,procexplorer
- ios 开发,常见报错及修复
- 融银p2p系统时间,时区说明
- linux的挂载磁盘步骤
- 多线程:使用ImageView下载图片(模仿 SDWebImage)
- php mvc 框架演示
- 引用和指针
- 数据库的备份和恢复
- 第1周 项目(A)-4周求两数正差值
- Android 自定义View高级特效,神奇的贝塞尔曲线
- 反调试与反反调试
- 笔记 Android的Fragment初使用
- php mvc 框架演示
- php mvc 框架演示