开发者

I want alphabet strip (like in addressBook) on UITableViewControler

开发者 https://www.devze.com 2023-02-05 23:26 出处:网络
I want an alphabet strip (like in addressBook) on UITableViewControlle开发者_运维知识库r.Please help.You need to implement the TableView delegate method

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

精彩评论

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