版权声明:本文为博主原创文章,未经博主允许不得转载。 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
//实现
}