11
我想返回大写的NSString
的第一个字母。我有一个UISearchDisplayController
,根据搜索结果的标题显示部分标题。返回大写的NSString的第一个字母
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
NSString *sectionTitle;
if (searching)
sectionTitle = [searchSectionTitles objectAtIndex:section];
else
sectionTitle = [[collation sectionTitles] objectAtIndex:section];
return sectionTitle;
}
并返回的信,在我的搜索功能,
[searchSectionTitles addObject:[lastName firstLetter]];
我怎样才能让
- (NSString *)firstLetter
返回NSString
的第一个字母?