开发者

I want alphabet strip (like in addressBook) on UITableViewControler

I want an alphabet strip (like in addressBook) on UITableViewControlle开发者_运维知识库r. Please help.


You need to implement the TableView delegate method

-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{

}

Cheers


I think the correct answer is

- (NSArray *) sectionIndexTitlesForTableView:(UITableView *)tableView {
}

just for the record!

Apple documentation:
Return Value
An array of strings that serve as the title of sections in the table view and appear in the index list on the right side of the table view. The table view must be in the plain style (UITableViewStylePlain). For example, for an alphabetized list, you could return an array containing strings “A” through “Z”.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜