Search code examples
iosswiftwatchkitapple-watch

Apple watch page based without arrow to go back


I have a initial controller, that have a button with push segue to a dynamic page based navigation, when I do segue the go back arrow disappear, and I can not return to the initial view, how can I add a go back arrow to return?

when I go to the next controller with the button I have code to create dynamic page based

WKInterfaceController.reloadRootControllersWithNames(controllers as      [AnyObject],contexts: contexts as [AnyObject])

these work well, and I have a page based navigation, but if I want to return I do not have the arrow.


Solution

  • You can't transition from a hierarchical navigation type to a page-based navigation type in a WatchKit app. They are exclusive - you have to use one or the other.

    If you want to change from one to the other you have to present the new type as a modal.

    Here's a link to the HIG explaining it: https://developer.apple.com/watch/human-interface-guidelines/app-components/