Custom UITableView section index

后端 未结 9 780
暗喜
暗喜 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:44

    https://github.com/Hyabusa/CMIndexBar

    Use this plugin from Hyabusa. Simple replacment for UITableView Index that allows setting of colors

    CMIndexBar *indexBar = [[CMIndexBar alloc] initWithFrame:CGRectMake(self.view.frame.size.width-35, 10.0, 28.0, self.view.frame.size.height-20)];
    [indexBar setIndexes:[NSMutableArray arrayWithObjects:@"A",@"B",@"C",@"D",@"E",@"F",@"G", nil]];
    [self.view addSubview:indexBar];
    [indexBar release];
    

    Delegate

    - (void)indexSelectionDidChange:(CMIndexBar *)IndexBar:(int)index:(NSString*)title;
    

提交回复
热议问题