Dan*_*ett 5 cocoa-touch uitableview
我们想为UITableView实现我们自己的部分索引UI.
这显然是可能的,因为联系人应用程序在iPad上完成.有没有办法合法地隐藏当前的部分索引?(我可以找到无证件的_index UIView,但我不怀疑它会用苹果切割它)
Dan*_*ett 13
答案有帮助.
这里的诀窍是
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView;
Run Code Online (Sandbox Code Playgroud)
返回nil,同时保持其他基于部分的数据源方法的实现:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
Run Code Online (Sandbox Code Playgroud)
这似乎说服tableview不显示节索引,但仍允许按索引导航.
| 归档时间: |
|
| 查看次数: |
4039 次 |
| 最近记录: |