To get a better result (having "Std" appear during scrolling and disappearing from previous selection, you need to intercept the scroll position. See discussion here: https://stackoverflow.com/questions/5237696/read-position-of-uipickerview-while-scrolling
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
Complete code, I mean the view including the switch as well as the views you call. And most important, the error code. You can also attach a textFile with the attach button just below the editing frame in this page (rightmost icon ∞)
To get a better result (having "Std" appear during scrolling and disappearing from previous selection, you need to intercept the scroll position. See discussion here: https://stackoverflow.com/questions/5237696/read-position-of-uipickerview-while-scrolling
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
Complete code, I mean the view including the switch as well as the views you call. And most important, the error code. You can also attach a textFile with the attach button just below the editing frame in this page (rightmost icon ∞)