iosios8watchkitapple-watchxcode-6.2

How to send more than one object between controllers in Hierarchical navigation style in Apple watch?


I am developing an app for Apple watch. I am pushing a interface controller from another interface controller ,how to send more than one object between controllers in Hierarchical navigation style?


Solution

  • There are two ways to do so.

    First: Pass an Array or Dictionary (according to jastrada - Sorry, because of my low reputation I can't vote up)

    Second: Make a global structure or class (with static values) and when going from one to another, initialize the class and give it values, and get the values back in the second view.

    Both of them will cause the expected results.