如何隐藏 Apple Watch 状态栏中的后退按钮?
问题描述:
我想从状态栏中隐藏 Apple Watch 应用的后退按钮.
I want to hide the back button from my Apple Watch app from the status bar.
我使用可编程的 segue 进行导航.但我想隐藏/禁用后退按钮.可能吗?
I used the programmable segue to navigate. But I want to to hide/disable the back button. Is it possible?
答
这就是你的做法:
WKInterfaceController.reloadRootControllersWithNames(
["myInterfaceController"], contexts: []
)
其中 myInterfaceController
是目标接口控制器的标识符.
Where myInterfaceController
is the identifier of the destination Interface Controller.
感谢 Harvant 的指点.
Thanks to Harvant for the pointer.