if([myTableViewrespondsToSelector:@selector(setSectionIndexColor:)]){myTableView.sectionIndexColor=[UIColorredColor];myTableView.sectionIndexBackgroundColor=[UIColoryellowColor];}

for(UIView*viewin[tableViewsubviews]){if([[[viewclass]description]isEqualToString:@"UITableViewIndex"]){[viewsetBackgroundColor:[UIColorredColor]];[viewsetTintColor:[UIColorredColor]];}}

UITableView修改右边索引的位置和颜色。