You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public final class DistributedNotificationObserver{
public class func addObserver(name:String,observer:UIViewController,callBack:@escaping CFNotificationCallback) {
let observer = UnsafeRawPointer(Unmanaged.passUnretained(observer).toOpaque())
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), observer, callBack, name as CFString, nil, CFNotificationSuspensionBehavior.deliverImmediately)
}
public class func removeObservers(observer:UIViewController,name:String) {
let observer = Unmanaged.passUnretained(observer).toOpaque()
let name = CFNotificationName.init(name as CFString)