2022年3月1日

iOS基础 - 线程通信 | 线程切换

摘要: ▶ 线程通信 在开发中我们经常会在子线程进行耗时操作,等待操作结束后再回到主线程去刷新 UI,这就涉及到了子线程和主线程之间的通信;我们先来了解一下官方关于 NSThread 线程间通信的方法 // 在主线程上执行操作 - (void)performSelectorOnMainThread:(SEL 阅读全文

posted @ 2022-03-01 11:04 低头捡石頭 阅读(282) 评论(0) 推荐(0)

iOS基础 - GCD:常用API

摘要: ▶ 常用 API 在开发中,我们经常使用到的 API 有 // 任务只执行一次 dispatch_once() // 同步执行 dispatch_sync() // 异步执行 dispatch_async() dispatch_async_f() // 延迟到的时间点执行 dispatch_afte 阅读全文

posted @ 2022-03-01 01:40 低头捡石頭 阅读(65) 评论(0) 推荐(0)

导航