Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Passing Global value to detailScreen from mainScreen.

FritzFritz USMember

I have two buttons on my mainScreen. When a button is tapped, I set a global variable for the button's value. (just a string, e.g. Button1). After the button selection, a detailScreen is opened. I want to set a label on the detailScreen. to use the string that was set on the mainScreen.

Code to call the detail screen from the button.TouchUpInside is in the MainScreen ViewDidLoad(). And I set the label in the detailScreen, in the ViewDidLoad in the DetailScreen. But it only gets called once, when I tap on the Back Button and selected another button, the label does not change.

Is there another event I should use? A short snippet would be appreciated.


Sign In or Register to comment.