コアデータで保存操作を実行し、正常に終了しました。データが保存されます。データもログに取り込まれました。これはログのデータを取得するための私のコードですが、私はTableViewでこのデータをフェッチする方法を知らない。コアデータからテーブルビューを取り込む
NSError *error;
DemoAppCoreDataAppDelegate *appdelegate = (DemoAppCoreDataAppDelegate *)[[UIApplication sharedApplication]delegate];
NSManagedObjectContext *context = [appdelegate managedObjectContext];
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc]init];
NSEntityDescription *entity = [NSEntityDescription entityForName: @"Employee" inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSArray *fetchedobject = [context executeFetchRequest:fetchRequest error:&error];
tablearray = [[NSMutableArray alloc] initWithArray:fetchedobject copyItems:YES];
for (NSManagedObject *info in fetchedobject) {
NSLog(@ "%@",[info valueForKey:@"name"]);
}
[fetchRequest release];