【发布时间】:2014-09-26 10:18:38
【问题描述】:
这两个代码sn-ps有什么区别:
let cell = tableView.dequeueReusableCellWithIdentifier("cellId") as UITableViewCell?
// vs
let cell = tableView.dequeueReusableCellWithIdentifier("cellId") as? UITableViewCell
结果不完全一样吗?
【问题讨论】:
-
as UITableViewCell?导致 Swift 2 中的编译错误AnyObject? is not convertible to UITableViewCell?