修改该uitableview的索引的背景1 for (UIView *subview in [tableView subviews])2 {3 if ([subview isKindOfClass:NSClassFromString(@"UITableViewIndex")])4 {5 [subview performSelector:@selector(setBackgroundColor:) withObject:[UIColor colorWithHue:0f saturation:0f brightness:0f alpha:30f]];6// [subview setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"png"]]];7 }8 if([subview respondsToSelector:@selector(setIndexColor:)])9 {10 [subview performSelector:@selector(setIndexColor:) withObject:[UIColor redColor]];11 }12 if([subview respondsToSelector:@selector(setIndexBackgroundColor:)])13 {14 [subview performSelector:@selector(setIndexBackgroundColor:) withObject:[UIColor colorWithPatternImage:[UIImage imageNamed:@"indexbg_png"]]];15// [subview performSelector:@selector(setIndexBackgroundColor:) withObject:[UIColor colorWithHue:0f saturation:0f brightness:0f alpha:16f]];16 }17 }