iosobjective-cuitableviewtheoscydia-substrate

Index SBSearchViewController - UITableViewDataSource not indexing


SBSearchViewController's UITableView's delegate and dataSource is the SBSearchViewController

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

I've defined

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

However the table remains un-indexed. Both of the above methods are never called. What am I missing? Is there another way to display table indexes?


Solution

  • You need to %new the

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

    methods in order for the indexing to work. They aren't called by default so you can't overwrite them. You will then need to style the indexing as it is white (no blur etc) by default.