How to pass data using NotificationCenter in swift 3.0 and NSNotificationCenter in swift 2.0?
Swift 2.0 Pass info using userInfo which is a optional Dictionary of type [NSObject : AnyObject]? let imageDataDict:[String: UIImage] = [“image”: image] // Post a notification NSNotificationCenter.defaultCenter().postNotificationName(notificationName, object: nil, userInfo: imageDataDict) // Register to receive notification in your class NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(self.showSpinningWheel(_:)), name: notificationName, object: nil) // handle notification func showSpinningWheel(notification: NSNotification) { if let … Read more