我有一个接口控制器,当按下按钮时,它会转到另一个接口控制器。我是这样做的
- (IBAction)setLocationPressed {
[self pushControllerWithName:@"setLocation" context:self.appContext];
}
当按下第二个按钮时,如何返回第一个控制器?
答案 0 :(得分:3)
如果您查看WKinterfaceController
(https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceController_class/index.html#//apple_ref/occ/instm/WKInterfaceController/popController)的文档,则会看到两种与您要执行的操作相关的方法:popController
和{{1} }。