How to change the color of the letters in the IndexTitlesForTableView section? Is this possible on iphone?

Do I need to change the color of the sectionIdexTitle to represent the table? How to do it? Anyone know this ?? please, say Me??

+3
source share
2 answers

It's impossible. You will need to use a custom view:

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

Then you can create your own UILabel with any color you want.

0
source

With iOS 6 you can do it.

if ([tableView respondsToSelector:@selector(setSectionIndexColor:)]) {
        tableView.sectionIndexColor = ... ;  // some color
}
0
source

Source: https://habr.com/ru/post/1719149/


All Articles