2021年3月24日

Swift 5 Combine 和 NotificationCenter 结合使用

摘要: NotificationCenter 通常使用 需要先注册addObserver 再监听发布通知 post 还要与addObserver 成对出现 removeObserver 现在结合Combine 在注册通知时候可以写成数据流式 1 构建发布者publisher,数据流式返回订阅者refresh 阅读全文

posted @ 2021-03-24 15:10 ACM_Someone like you 阅读(471) 评论(0) 推荐(0) 编辑

Swift Combine 基本学习与使用

摘要: Combine基本认知 Combine 是基于泛型实现的,是类型安全的。它可以无缝地接入已有的工程,用来处理现有的 Target/Action、Notification、KVO、callback/closure 以及各种异步网络请求。 Combine 是基于观察者模式,响应式编程的编程思想 观察者模 阅读全文

posted @ 2021-03-24 11:50 ACM_Someone like you 阅读(1181) 评论(0) 推荐(0) 编辑

导航