大きなUITableView
のスクロールを高速化するためにUITableView
インデックスを作成しようとしていますが、右にインデックスが表示されていますが、スクロールしようとすると機能しません..UITableViewをインデックスでスクロール可能にする
私は何かを見逃してしまったのだろうかと思っているので、何か他に何かがあるか、それとも何かがあるかどうか疑問に思っています。
#pragma - TableView Index Scrolling
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
if(searching)
return nil;
NSMutableArray *tempArray = [[NSMutableArray alloc] init];
[tempArray addObject:@"A"];
[tempArray addObject:@"B"];
[tempArray addObject:@"C"];
[tempArray addObject:@"D"];
[tempArray addObject:@"E"];
[tempArray addObject:@"F"];
[tempArray addObject:@"G"];
[tempArray addObject:@"H"];
[tempArray addObject:@"I"];
[tempArray addObject:@"J"];
[tempArray addObject:@"K"];
[tempArray addObject:@"L"];
[tempArray addObject:@"M"];
[tempArray addObject:@"N"];
[tempArray addObject:@"O"];
[tempArray addObject:@"P"];
[tempArray addObject:@"Q"];
[tempArray addObject:@"R"];
[tempArray addObject:@"S"];
[tempArray addObject:@"T"];
[tempArray addObject:@"U"];
[tempArray addObject:@"V"];
[tempArray addObject:@"W"];
[tempArray addObject:@"Y"];
[tempArray addObject:@"X"];
[tempArray addObject:@"Z"];
return tempArray;
}
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {
if(searching)
return -1;
return index % 2;
}
大丈夫、あなたの返事のおかげで、可能性があると思った。これを理解するために周囲を読んでください。あなたがオンラインの例を知っていて、リンクがあれば、私はそれを高く評価します。 –
ああこれは私が考えているこのステップでやっているようだと思う.http://www.iphonesdkarticles.com/2009/01/uitableview-sectioned-table-view.html –
そうですね、それだけです。 –