WatchKit 上下文菜单,如何判断它用于哪一行?

WatchKit context menu, how to tell which row it was for?

我的界面控制器中有一个 WKInterfaceTable,并已将上下文菜单添加到控制器中。点击按住特定行时,该行会按下并显示上下文菜单。我怎么知道菜单是哪一行?

您的 WKInterfaceController.

会调用以下内容
- (void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex

上下文菜单适用于整个视图,它与您点击的位置无关。