我的应用程序有两个标签栏...每个用户都带一个tableviewcontroller,向他提供一个项目列表.第一个视图允许用户记录数据库中的条目.另一个选项卡/视图从数据库读取并将这些项呈现给用户,但是,没有从第二个视图对coreData/persistant存储进行更新.
当我通过第一个viewcontroller添加一个新项目时,它在视图中完美显示.但是,只要我点击另一个标签栏以查看新项目出现在该viewcontroller中,我就会收到下面列出的错误,并且新添加的项目不会出现...注意:如果我停止应用并重新加载/重新运行它,并通过点击第二个标签栏开始,新项目显示正常,所以我知道模型正在更新.
*** Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableView.m:1046
2011-10-20 20:56:15.117 Gtrac[72773:fb03] CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (4) must be equal to the number of rows contained in that section before the update (3), plus or minus the number of rows inserted or deleted from …Run Code Online (Sandbox Code Playgroud) iphone core-data uitableview nsfetchedresultscontroller nsmanagedobject
我想要一份关于两者之间比较的详细清单.我所知道的事情:
executeFetchRequest:
performFetch:
fetchedObjects返回一个托管对象数组performFetch初始化该进程.performFetch第二次 如果我错了请纠正我并附上清单.谢谢.
core-data objective-c nsfetchedresultscontroller nsfetchrequest