我想隐藏状态栏中Apple Watch应用程序的后退按钮。
我使用可编程segue进行导航。但我想隐藏/禁用后退按钮。有可能吗?
答案 0 :(得分:5)
您就是这样做的:
WKInterfaceController.reloadRootControllersWithNames(
["myInterfaceController"], contexts: []
)
其中myInterfaceController
是目标接口控制器的标识符。
感谢Harvant的指针。
答案 1 :(得分:1)
如果您查看了WKInterfaceController
的文档,那么您将看到没有API可以完成您正在寻找的内容:https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceController_class/
您可以做的最好的事情是更改标题/按钮的文字或调整色调颜色。
答案 2 :(得分:0)
您可以使用方法presentControllerWithName
以模态方式呈现接口控制器。然后,在调用的接口控制器中,只需使用方法setTitle
设置标题。
答案 3 :(得分:0)