Customizing Section indexes in UITableView in iphone application

前端 未结 5 1615
忘掉有多难
忘掉有多难 2020-12-03 17:56
  • Does any one have tried to customize default section index displayed in UITableView.
  • I want to modify the appearance of UITableView SectionIndex.
  • Is
5条回答
  •  情歌与酒
    2020-12-03 18:33

    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;
    

提交回复
热议问题