if ([myTableView respondsToSelector:@selector(setSectionIndexColor:)]) {
myTableView.sectionIndexColor = [UIColor redColor];
myTableView.sectionIndexBackgroundColor = [UIColor yellowColor];
}for(UIView *view in [tableView subviews]) {
if([[[view class] description] isEqualToString:@"UITableViewIndex"])
{
[view setBackgroundColor:[UIColor redColor]];
[view setTintColor:[UIColor redColor]];
}
}UITableView修改右边索引的位置和颜色。
本文出自 “雪花飞落满人间” 博客,请务必保留此出处http://smengxiang.blog.51cto.com/11204872/1862102
原文:http://smengxiang.blog.51cto.com/11204872/1862102