- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Xode 8 beta 6 为 watchOS 3
创建一个应用程序。使用自定义行创建 WKInterfaceTable
时,我似乎无法让选择工作。
我不想要执行segue,我只是想获取didSelectRowAtrowIndex
打电话。
设置:
下面的函数没有被调用:
override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int)
{print("selected \(rowIndex)")}
我的行没有 segue 集,这似乎是其他人遇到的问题。该表是我使用推送 segue 打开的 View 的一部分
rootViewController -push-> myViewWithTableController -touchCell-> 没有任何反应
我错过了什么?
最佳答案
我在文档中搜索了转换的任何约束,但找不到。 https://developer.apple.com/documentation/watchkit/storyboard_elements/building_watchos_app_interfaces_using_the_storyboard/navigating_between_scenes
尝试了一些模式。
如果将 tableController 的 Action Segue
从 Push
更改为 Modal
,则可以转换。
此外,在 Storyboard 中加入 segue 时,不会调用 didSelectRowAt
。
关于ios - WKInterfaceTable 不可选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39331481/
我正在尝试用 Swift 编写这段 JavaScript 代码:k_combinations 到目前为止,我在 Swift 中有这个: import Foundation import Cocoa e
我是一名优秀的程序员,十分优秀!