こんにちは、フェッチ結果のデッドエンド順序をソートする必要があります。これが私のコードです
NSManagedObjectContext *context = [appDelegate managedObjectContext];
NSError *error1;
NSEntityDescription *entityDesc;
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
entityDesc=[NSEntityDescription entityForName:@"SubCategoryEntity" inManagedObjectContext:context];
[fetchRequest setEntity:entityDesc];
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc]
initWithKey:@"subCategoryId" ascending:NO];
[fetchRequest setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
[sortDescriptor release];
NSArray *array = [context executeFetchRequest:fetchRequest error:&error1];
ここでは「サブカテゴリ」文字列タイプを使用しているため、「1 桁」では正しい順序で表示されますが、「2 桁」では機能しませんでした
ここでは、「11」「9」、「8」、「7」、「6」、「5」、「4」、「3」、「2」、「1」、「10」、 「0」
ここでは、「10」、「9」、「8」、「7」、「6」、「5」、「4」、「3」、「2」、「1」、「0」を表示する必要があります
なぜそれがハプニングなのかわからない 誰か助けてくれる?
よろしくお願いします。