アプリケーションでcoredataを使用して値を格納および取得しています。NSMutableArrayを使用したいのですが、
AppDelegate *appDelegate = [[UIApplication sharedApplication]delegate];
NSManagedObjectContext *context = [appDelegate managedObjectContext];
NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"NewExpense" inManagedObjectContext:context];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc]init];
[fetchRequest setEntity:entityDesc];
NSError *error;
//self.newArrayがNSMutableArrayである次の行でエラーが発生します
self.newArray = [[context executeFetchRequest:fetchRequest error:&error]retain];
[fetchRequest release];
nsarrayからnsmutablearrayに割り当てる互換性のないポインタ型を示しています。
しかし、テーブルビューを編集しているときに、それを単なる配列として宣言すると、nsmutablearrayが必要になるため、並べ替えが機能しません。