【发布时间】:2015-08-02 17:09:26
【问题描述】:
我在这段代码中遇到了以下错误:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell: UITableViewCell? = tableView.dequeueReusableCellWithIdentifier("Cell") as? UITableViewCell
错误:从“UITableViewCell”向下转换?到 'UITableViewCell' 只解开选项;您的意思是使用“!”吗?
有什么想法吗?
【问题讨论】:
-
将
UITableViewCell?更改为UITableViewCell!
标签: ios swift uitableview swift2 xcode7