我们想为UITableView实现我们自己的区段索引UI。
这显然是可能的,因为联系人应用程序在iPad上做到了这一点。有没有一种合法隐藏当前段索引的方法?(我可以找到未公开的_index UIView,但我怀疑这不会影响苹果)
发布于 2010-06-23 21:23:20
这个答案很有帮助。
这里的诀窍是
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView;返回nil,同时保留其他基于节的数据源方法的实现:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section这似乎说服了tableview不显示区段索引,但仍然允许按索引导航。
发布于 2010-06-20 00:46:12
https://stackoverflow.com/questions/2581606
复制相似问题