添加 Core Data 对象后 tableView 未更新
给定这个核心数据模型:摄影师<-->>照片。
通过模态视图添加摄影师后,摄影师的 tableView 会相应更新。
问题是,它对照片的作用不同。我可以通过模态视图添加照片,并且该特定摄影师的照片的表视图不会立即更新。一旦我导航回摄影师的表格视图并再次选择同一摄影师,它就会按预期更新。
当模态视图(用户添加对象的位置)被关闭时,如何让照片的 tableView 立即更新?
Given this Core Data Model: Photographer <-->>Photos.
After adding a Photographer via a Modal View, the tableView of Photographers updates accordingly.
The problem is, that it doesn't do the same for Photos. I can add a Photo via a Modal View, and the tableView of Photos for that particular Photographer does not update immediately. Once I navigate back to the tableView of Photographers and select the same Photographer again, it updates as expected.
How can I get the tableView of Photos to update as soon as the Modal View(where the user added the object) gets dismissed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
模态视图解雇尝试使用的地方:
Where modal view dismiss try to use:
获得新数据后尝试
方法。
Try
method after getting new data.
首先检查你的数组是满的还是空的?尝试使用 NSLog 并检查它。如果存在则重新加载表
Check your array first is it fill or empty? try with NSLog and check it. if it exist then reload your table