How do I change the color of the side Alphabet in an indexed UITableView?

后端 未结 12 957
温柔的废话
温柔的废话 2020-11-27 14:03

I have a table view with an alphabetical index and am using the side alphabet to get through the list quickly. For those not familiar, that uses this:

- (NS         


        
12条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 14:19

    if your minimum iOS version is newer than 6.0, you can use sectionIndexColor property of UITableView.

    The color to use for the table view’s index text.

    @property(nonatomic, retain) UIColor *sectionIndexColor

    Discussion:

    Table views can display an index along the side of the view, making it easier for users to navigate the contents of the table quickly. This property specifies the color to use for text displayed in this region.


    Update date 2014.1.13

    I find an open source third party library:GDIIndexBar to help custom the index appearance.

提交回复
热议问题