开发者

Iphone - managedobjectcontext not properly saving

Any idea why

    //should save the object context.
NSError *error;
if (![managedObjectContext save:&error]) {
    NSLog(@"SAVE ERROR");
}

when implemented in a view controller(accessed via a drill down tableview) won't properly save the information? I am passing the moc from the beginning (rootview hands off to tableview, tableview recursively passes it to itse开发者_如何学Clf until calls uiview) and any additions I do show up in the table if I pop/push the tableview(unfortunately reloadData in viewWillAppear doesn't want to update it).

Should I be passing the managedObject instead and fetching the context from that?


Since I was manually creating the sqlite entries in the code on load, I was also manually deleting it in the persistentStoreCoordinator each time the program started. Unfortunately, I forgot about that aspect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜