美文网首页
Swift 刷新当前cell跳动解决办法

Swift 刷新当前cell跳动解决办法

作者: JackMayx | 来源:发表于2018-08-08 14:19 被阅读75次

这样会出现跳动

let indexPath = IndexPath.init(row: 2, section: 0)
self.tableView .reloadRows(at: [indexPath], with: UITableViewRowAnimation.none)

使用以下代码解决跳动问题

let indexPath = IndexPath.init(row: 2, section: 0)
        UIView.performWithoutAnimation {
            self.tableView .reloadRows(at: [indexPath], with: UITableViewRowAnimation.none)
        }

相关文章

网友评论

      本文标题:Swift 刷新当前cell跳动解决办法

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