私はiosを始めたばかりで、UITableView
.
ビューの右側にインデックス バーを実装したいと考えています。これを実装しましたが、インデックス バーのセクションをタップしても機能しません。
これは私のコードです。indexArray
これは「AZ」要素でfinalArray
あり、私の可変UITableView
配列です。
で何を実装すればよいか教えてくださいsectionForSectionIndexTitle
。
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return [finalArray count];
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection: (NSInteger)section
{
return [finalArray objectAtIndex:section];
}
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
return indexArray;
}
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle: (NSString *)title atIndex:(NSInteger)index
{
}