
通知
MOKA
这个作者很懒,什么都没留下…
展开
-
Notification与多线程
前几天与同事讨论到Notification在多线程下的转发问题,所以就此整理一下。 先来看看官方的文档,是这样写的: In a multithreaded application, notifications are always delivered in the thread in which the notification was posted, which may not be the转载 2016-05-23 14:08:35 · 351 阅读 · 0 评论 -
iOS 通知观察者的被调函数不一定运行在主线程
iOS 通知观察者的被调函数不一定运行在主线程 今天修复Bug时候发现的一个小细节,记录下。 问题描述 事情是这样的:我在A视图(UITableView)注册了一个通知,当接收到此通知时,就重新读取数据并调用[tableView reloadData]。但是视图有时刷新后的显示的内容不对,再重新切换下视图又正常了。 代码如下: 1234567891转载 2016-05-23 15:41:52 · 653 阅读 · 0 评论