Post

Replies

Boosts

Views

Activity

Reply to passing data from view one to seven
thanks @darkpaw. Is there a time frame in which notification has to pass ? As VC1 to VC6 takes a while as i have image upload and data entry in other views. // Post part NotificationCenter.default.post(name: Notification.Name("PassData"), object: nil, userInfo: ["data": "apple It is"]) // Destination Part override func viewDidLoad() { super.viewDidLoad() NotificationCenter.default.addObserver(self, selector: #selector(handleNotification(:)), name: Notification.Name("PassData"), object: nil) } @objc func handleNotification( notification: Notification) { if let data = notification.userInfo?["data"] as? String { print(data) } --------- I am still unable to get the result printed (print data). Does notification works if there is multiple views between them.
Apr ’24