Search code examples
swiftseguewatchkit

How to hide the back button from the status bar on the Apple Watch?


I want to hide the back button from my Apple Watch app from the status bar.

I used the programmable segue to navigate. But I want to to hide/disable the back button. Is it possible?


Solution

  • This is how you do it:

    WKInterfaceController.reloadRootControllersWithNames(
         ["myInterfaceController"], contexts: []
    )
    

    Where myInterfaceController is the identifier of the destination Interface Controller.

    Thanks to Harvant for the pointer.