OGeek|极客世界-中国程序员成长平台

标题: ios - WKInterfaceTable 不可选择 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 17:26
标题: ios - WKInterfaceTable 不可选择

我正在使用 Xode 8 beta 6 为 watchOS 3 创建一个应用程序。 使用自定义行创建 WKInterfaceTable 时,我似乎无法使选择正常工作。

我确实想要执行转场,我只是想获得 didSelectRowAtrowIndex 调用。

设置:

以下函数没有被调用:

override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int)
{print("selected \(rowIndex)")}

我的行没有 segue 集,这似乎是其他人遇到的问题。 该表是我使用 push segue 打开的 View 的一部分

rootViewController -push-> myViewWithTableController -touchCell-> 没有任何反应

我错过了什么?



Best Answer-推荐答案


我在文档中搜索了转换的任何限制条件,但找不到。 https://developer.apple.com/documentation/watchkit/storyboard_elements/building_watchos_app_interfaces_using_the_storyboard/navigating_between_scenes

尝试了一些模式。

如果将tableController的Action SeguePush改为Modal,就可以过渡了。

另外,didSelectRowAt 在 Storyboard 中加入 segue 时不会被调用。

关于ios - WKInterfaceTable 不可选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39331481/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4