0

SBSearchViewControllerUITableView委托和数据源是SBSearchViewController

@interface SBSearchViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, ...>

我已经定义

-(id)sectionIndexTitlesForTableView:(id)arg1;
-(int)tableView:(id)arg1 sectionForSectionIndexTitle:(id)arg2 atIndex:(int)arg3;

但是,该表仍然未编制索引。上述两种方法都不会被调用。我错过了什么?还有另一种显示表索引的方法吗?

4

1 回答 1

0

%new你需要

-(id)sectionIndexTitlesForTableView:(id)arg1;
-(int)tableView:(id)arg1 sectionForSectionIndexTitle:(id)arg2 atIndex:(int)arg3;

方法,以便索引工作。默认情况下不会调用它们,因此您无法覆盖它们。然后,您需要设置索引样式,因为它默认为白色(无模糊等)。

于 2014-06-22T22:19:40.317 回答