How do I hide the back button on the status bar on Apple Watch?
I want to hide the back button from the Apple Watch app from the status bar.
I used a programmable segue for navigation. But I want to hide / disable the back button. Is it possible?
This is how you do it:
WKInterfaceController.reloadRootControllersWithNames(
["myInterfaceController"], contexts: []
)
Notes: "myInterfaceController" is identifier of Interface Controller destiny.
Thanks to Harvant for the pointer.
If you check the docs for WKInterfaceController
you will see that there is no API to accomplish what you are looking for: https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceController_class/
The best you can do is change the title / button text or adjust the tint color.
You can modify the interface controller using the method presentControllerWithName
. Then, in your interface controller, simply set the title using the method setTitle
.