Apple watchkit 应用程序 WKInterfaceTable > Row Controllers > Buttons 操作在 Objective-C 中不起作用
Posted
技术标签:
【中文标题】Apple watchkit 应用程序 WKInterfaceTable > Row Controllers > Buttons 操作在 Objective-C 中不起作用【英文标题】:The apple watchkit app WKInterfaceTable > Row Controllers > Buttons action not working in Objective-C 【发布时间】:2015-04-08 15:30:41 【问题描述】:我正在使用带有一些图像、标签和按钮的 WKInterfaceTable,但是当我们点击按钮时,我们无法触发按钮事件。
【问题讨论】:
【参考方案1】:你有没有尝试过这样的事情:
首先确保你有一个类似这样的 WKInterfaceButton:
@property (weak, nonatomic) IBOutlet WKInterfaceButton* actionButton;
或者,如果您尝试响应表格行中的点击,您将需要实现界面控制器的 table:didSelectRowAtIndex: 方法。
我不是专家,我只是想出可能有帮助的合乎逻辑的步骤。您可以尝试查看this 链接。他们也提到了在 Objective C 中做事的方式,所以也许它会有所帮助。
【讨论】:
以上是关于Apple watchkit 应用程序 WKInterfaceTable > Row Controllers > Buttons 操作在 Objective-C 中不起作用的主要内容,如果未能解决你的问题,请参考以下文章
是否可以在实际 Apple Watch 设备上运行 WatchKit 应用程序?
Apple Watch:一个 Watchkit App 可以与多个 iOS App 通信吗?
是否需要 Watchkit 应用程序才能在 Apple Watch 上显示应用程序的远程通知?