使用
let cell:PrincipalCell = self.tableView?.cellForRow(at: indexPath) as! PrincipalCell
报错.
使用下方的不报错。
let cell:PrincipalCell = (self.tableView?.cellForRow(at: indexPath) as? PrincipalCell)!
使用
let cell:PrincipalCell = self.tableView?.cellForRow(at: indexPath) as! PrincipalCell
报错.
使用下方的不报错。
let cell:PrincipalCell = (self.tableView?.cellForRow(at: indexPath) as? PrincipalCell)!
本文标题:使用cellForRow(at:)创建cell
本文链接:https://www.haomeiwen.com/subject/yyvsattx.html
网友评论