9
如何快速检测触摸或单击的tableView单元格
我正在尝试获取index所选项目,TableView然后开始一些活动。不幸的是,我发现的大多数解决方案都在Objective-C中或不起作用。 方法func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)不打印cell标签。 有人可以帮我吗? import UIKit import ResearchKit class TaskListViewController: UIViewController, UITableViewDataSource { let tasks=[("Short walk"), ("Audiometry"), ("Finger tapping"), ("Reaction time"), ("Spatial span memory") ] //how many sections are in your table func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } //return int how many rows …
76
ios
swift
uitableview