Objective c 如何使用objective c实现apple watch crown委托

Objective c 如何使用objective c实现apple watch crown委托,objective-c,apple-watch,Objective C,Apple Watch,我正在开发apple watch应用程序,需要使用crown更新标签值。我已经使用swift实现了该功能。在swift中,我们有名为crownSequencer的属性来实现crown委托,如 crownSequencer.delegate=self;corlownSequencer.focus() 但我无法找到在objective c中实现它的方法,因为objective c没有显示任何名为crownSequencer 任何帮助都将不胜感激。可以通过InterfaceController对象访问

我正在开发apple watch应用程序,需要使用crown更新标签值。我已经使用swift实现了该功能。在swift中,我们有名为crownSequencer的属性来实现crown委托,如
crownSequencer.delegate=self;corlownSequencer.focus()
但我无法找到在objective c中实现它的方法,因为objective c没有显示任何名为
crownSequencer

任何帮助都将不胜感激。

可以通过InterfaceController对象访问CrownSequence

在目标C中,可通过以下方式访问:

- (void)awakeWithContext:(id)context {
    [super awakeWithContext:context];
    // Configure interface objects here.
    self.crownSequencer.delegate = self;
}
- (void)willActivate {
   [super willActivate];
   [self.crownSequencer focus];
}
注意::[self.crownSequencer focus]不应在(void)awakeWithContext:(id)context内调用,否则将不会调用委托方法

在这里你可以找到更多信息