mirror of
https://github.com/firebase/firebase-ios-sdk
synced 2026-11-10 22:45:59 +05:45
Add table view index to the sample app (#3513)
This commit is contained in:
1 parent
2c86f3a4d7
commit
c67c32afda
1 file changed
+12
@@ -54,6 +54,18 @@ static NSString *const kValueCellReuseIdentitfier = @"reuseValueIdentifier";
|
||||
return _contents.sections[section].title;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {
|
||||
return index;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)sectionIndexTitlesForTableView:(UITableView *)tableView {
|
||||
NSMutableArray<NSString *> *sectionTitles = [NSMutableArray array];
|
||||
for (StaticContentTableViewSection *section in _contents.sections) {
|
||||
[sectionTitles addObject:[section.title substringToIndex:3]];
|
||||
}
|
||||
return sectionTitles;
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
Reference in new issue
Block a user