从detailView返回时更新UITableView数据

发布于 2024-11-19 23:48:15 字数 190 浏览 2 评论 0原文

当在保存表视图的 ViewController 上调用 viewDidAppear 方法时,我更新 UITableView 的数据源。因此,每次用户从详细视图返回时,数据都会更新。

所以问题是 UI 被中断并且单元格被选择直到完成。

NSOperationQueue 是纠正这个问题的最佳方法吗?

感谢您的一些建议。

I update the UITableView's data source when viewDidAppear method is called on the ViewController that holds the tableview. So every time the user returns from the detailView the data is updated.

So the issue is that the UI is interrupted and the cell is selected until it is finished.

Is NSOperationQueue the best way to correct this?

Thanks for some suggestions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

宛菡 2024-11-26 23:48:16

就我个人而言,我会使用块或 NSOperation 来做这些事情。重要的是,如果你能帮助的话,UI 不会在任何时候被阻塞。

Personally I would do these kind of things using either blocks or an NSOperation. The important thing is that the UI doesn't get blocked at any time if you can help it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文