diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-05 20:21:26 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:39 -0800 |
commit | 1527b095dbeade949e8f00a836a315edd5a09baf (patch) | |
tree | ebb8ecee7a5a9cda3b6d9cbcdbeef37bc3c038aa /MobileCydia.mm | |
parent | 4c6a29cdb4ebf5c229d627b4abb7cb9963bc0bf5 (diff) |
Use setSectionIndexMinimumDisplayRowCount:.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 878cf45..6ca8f69 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6044,8 +6044,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (NSArray *) sectionIndexTitlesForTableView:(UITableView *)tableView { - // XXX: is 20 the most optimal number here? - return [packages_ count] > 20 ? index_ : nil; + return index_; } - (NSInteger) tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index { @@ -6081,6 +6080,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [list_ setRowHeight:73]; [[self view] addSubview:list_]; + // XXX: is 20 the most optimal number here? + [list_ setSectionIndexMinimumDisplayRowCount:20]; + [(UITableView *) list_ setDataSource:self]; [list_ setDelegate:self]; } return self; |