在我的故事板中,我有3个Interface Controller对象。我在属性选项卡中为每个人分配了一个标识符。
然后我有一个类“TasksController”,它是一个WKInterfaceController。对于每个Interface Controller,我将自定义类设置为“TasksController”。
我的代码目前看起来像:
Reversed audio id 64 Not equal to audioDevice[] of 68
Reversed audio id 92 Not equal to audioDevice[] of 96
Reversed audio id 85 Not equal to audioDevice[] of 89
Reversed audio id 76 Not equal to audioDevice[] of 80
Reversed audio id 72 Not equal to audioDevice[] of 76
Reversed audio id 56 Not equal to audioDevice[] of 60
Reversed audio id 48 Not equal to audioDevice[] of 52
Reversed audio id 99 Not equal to audioDevice[] of 103
Reversed audio id 96 Not equal to audioDevice[] of 100
是否可以在import WatchKit
import Foundation
class TasksController: WKInterfaceController {
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
print(context)
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
中获取接口控制器的标识符?我在每个接口控制器之间有一个“下一页”segue。每当我打印出来时,awakeWithContext
都是零。我是以错误的方式接近这个吗?
我想要标识符,以便我可以更改TasksController的一些属性,具体取决于实例。