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
的第一個字母?