shouldperformseguewithidentifier WatchKit 扩展

shouldperformseguewithidentifier WatchKit extension

在 WatchKit 扩展中是否有一种名为 "shouldperformseguewithidentifier" 的方法或类似的方法?这是因为我需要在推送到另一个视图之前进行检查。

docs 中快速搜索 WKInterfaceController 显示没有这样的方法。

如果您以编程方式实现导航——也就是说,不使用 segues——您可以使用任何您喜欢的逻辑来确定何时推送到另一个界面控制器。例如,您可以使用 pushControllerWithName:context: