我有一个WKInterfaceTable表视图和一个WKInterfaceButton。
如何从表视图向按钮添加目标操作。由于没有标记属性,所以我无法处理它。
发布于 2015-05-22 15:42:35
如果您的WKInterfaceButton包含在行控制器中,下面是确定哪个行的按钮被点击的方法:
WKInterfaceButton添加到行控制器,并使用接口生成器将按钮的操作连接到行控制器类- (void)rowController:(MyRowControllerClass *)rowController didSelectRowWithTag:(NSInteger)tag我在我自己的Watch应用程序中使用了这种技术,它运行得非常好。
https://stackoverflow.com/questions/30391698
复制相似问题