table调用layoutIfNeed任然无法获取cell的真实
2017-08-15 本文已影响14人
6a948902fef0
需要使用
let cell = tableView.dequeueReusableCellWithIdentifier(cellId, forIndexPath: indexPath) as? TaskInviteCell
创建cell
不用要
let reCell = tableView.dequeueReusableCellWithIdentifier(cellId)
var cell : TaskInviteCell?
if reCell == nil {
cell = UITableViewCell(style: .Default, reuseIdentifier: cellId) as? TaskInviteCell
}else{
cell = reCell as? TaskInviteCell
}