@sonam93 Yes, that requires that observer is added when notification is sent
See details here: https://stackoverflow.com/questions/66489663/nsnotification-not-observing-or-posting-data
Where and when do you load VC1 to VC6 ?
If it is just a timing delay, you could post the notification in a dispatch with a 0.2s delay. That should work (increase the delay a little bit if needed).
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
NotificationCenter.default.post(name: .sendApple, object: nil, userInfo: [kNotificationValue : "apple"])
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: