Post

Replies

Boosts

Views

Activity

Comment on Accessing Buttons Through Different View Controllers
Note that notification will work only if FirstViewController is loaded when you tap in SecondViewController (that is the case if you are in a navigation stack or if you present modally). Otherwise, you could save to userDefaults (in SecondViewController) and read userDefaults to set the button1 enabled or disabled in viewWillAppear in FirstViewController
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22