swift ReactiveSwift框架下通知(NotificationCenter)的使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012490014/article/details/84580295

注册:

NotificationCenter.default.post(name: Notification.Name(rawValue: "NotificationName"), object: object)

实现:

NotificationCenter.default.reactive.notifications(forName: Notification.Name(rawValue: "NotificationName")).observeValues {  [unowned self] object in
//实现
        }

猜你喜欢

转载自blog.csdn.net/u012490014/article/details/84580295