【发布时间】:2014-09-12 06:01:01
【问题描述】:
Xcode 说“候选人的 UITableView 类型不匹配.....”有人知道如何解决这个问题吗?
func tableView(tableView: UITableView?, numberOfRowsInSection section: Int)
-> Int {
return dataSource[section].count
}
func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath!)
-> UITableViewCell? {
let cell = tableView!.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
if let path = indexPath{
let currentString = dataSource[path.section][path.row]
cell.textLabel?.text = currentString
}
return cell
}
【问题讨论】:
-
欢迎来到 Stackoverflow。对场景的更多解释可能有助于专家理解问题。
标签: ios cocoa-touch uitableview swift