Custom UITableView section index

后端 未结 9 771
暗喜
暗喜 2020-11-27 14:54

Is it possible to customize the UITableView\'s section index? I mean, changing the font style/size, background (which is semitransparent by default) etc. I\'m guessing that

9条回答
  •  一生所求
    2020-11-27 15:42

    Swift version:

    tableView.sectionIndexBackgroundColor = UIColor.clearColor()
    tableView.sectionIndexTrackingBackgroundColor = UIColor.clearColor()
    tableView.sectionIndexColor = UIColor.redColor()
    

    To customize the index view height (UITableViewStylePlain style only):

    tableView.sectionIndexMinimumDisplayRowCount = 15
    

提交回复
热议问题