2011-10-17 81 views
1

我想弄清楚是否有一種簡單的方法來顯示錶視圖的索引欄中的整個節標題標題。在UITableView的索引欄中顯示整個節標題標題

目前我只有sectionNameKeyPath中指定的核心數據屬性的第一個字母 - 幾乎只是樣板代碼。

我想我需要從fetchedResultsController中爲sectionIndexTitlesForTableView創建另一個數組。

我錯過了一些明顯的東西嗎?

謝謝!

回答

2

添加以下內容:

- (NSString *)controller:(NSFetchedResultsController *)controller sectionIndexTitleForSectionName:(NSString *)sectionName { 
    return sectionName; 
}