Problem
I want to pass data between views in my mobile ViewNavigatorApplication as the user navigates around my mobile application.
Solution
In the following example I first pass data to a new view when I push it, and I return data when popping a view.
Detailed explanation
Pass data to the next view
To pass data to the next view you need to provide that data when calling the pushView method on the navigator. In the following code I show the "HomeView", this is the first view displayed by the mobile application. The user can enter text into the TextInput and press the Next View button. The button handler passes the text from the TextInput to the pushView method as the second parameter.
No comments:
Post a Comment