macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

sectionIndexTitlesForTableView:

テーブルビューの右側に表示されるインデックスリストの実装
-(NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView

解説

テーブルビューの右側に表示されるインデックスリストの実装

インデックスリストを触った場合
tableView:sectionForSectionIndexTitle:atIndex
が呼ばれます。

返り値

( NSArray * )

引数

( UITableView * )tableView

クラス

UITableViewDataSource

Instance Methods

使用可能

iPhone2.0

例文

//右側に表示されるインデックスリストの実装
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView
{
	NSArray *indexTitleArray = [NSArray arrayWithObjects:@"1", @"2", @"3", nil];
    return indexTitleArray;

}