美文网首页
table调用layoutIfNeed任然无法获取cell的真实

table调用layoutIfNeed任然无法获取cell的真实

作者: 6a948902fef0 | 来源:发表于2017-08-15 14:58 被阅读14次

需要使用

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
        }

相关文章

网友评论

      本文标题:table调用layoutIfNeed任然无法获取cell的真实

      本文链接:https://www.haomeiwen.com/subject/wcufkxtx.html