iOS 設置tableView右側索引


1.設置右側索引字體顏色

 self.tabView.sectionIndexColor = [UIColor blackColor];

2.設置右側索引背景色

self.cityTabView.sectionIndexBackgroundColor =[UIColor blackColor];

//顯示每組標題索引

-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView

//返回每個索引的內容

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section

//響應點擊索引時的委托方法

-(NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString*)title atIndex:(NSInteger)index


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM