私はMagicalRecord
自分のデータを取得するために使用しています。私のアプリには、連絡先グループにグループ化された連絡先のリストがあります。これらの連絡先グループをグループ化して表示していUITableView
ます。
たとえば、私は次のものを持っています(これは私が期待するものです):
Default Groups // section header
[Everyone] // cell row
[Favourites] // cell row
My Group // section header
[Coworkers] // cell row
時々、私のグループは混同されます:
Default Groups // section header
[Everyone] // cell row
[Coworkers] // cell row
My Group // section header
[Favourites] // cell row
並べ替えとグループ化に使用する各連絡先グループ名とグループ タイプ。グループ タイプは整数です。それらの属性を確認すると、実際には正しいグループ タイプがあります。
私のFRCは次のようになります。
fetchedResultsController = [ContactGroup fetchAllSortedBy:@"groupName"
ascending:YES
withPredicate:nil
groupBy:@"groupType"
delegate:self];
次のエラーが表示されます。
CoreData: error: (NSFetchedResultsController) The fetched object at index 2 has an out of order section name '1. Objects must be sorted by section name'
+[MagicalRecord(ErrorHandling) defaultErrorHandler:](0x2eefb8) Error: The fetched object at index 2 has an out of order section name '1. Objects must be sorted by section name'
+[MagicalRecord(ErrorHandling) defaultErrorHandler:](0x2eefb8) Error Message: The operation couldn’t be completed. (Cocoa error 134060.)
+[MagicalRecord(ErrorHandling) defaultErrorHandler:](0x2eefb8) Error Domain: NSCocoaErrorDomain
+[MagicalRecord(ErrorHandling) defaultErrorHandler:](0x2eefb8) Recovery Suggestion: (null)
詳細を提供する必要がある場合はお知らせください。この時点で困惑しており、何をすべきか 100% 確信が持てません。