美文网首页
iOS 对tableView执行transform动画,导致ta

iOS 对tableView执行transform动画,导致ta

作者: 心在前方 | 来源:发表于2018-11-29 17:14 被阅读0次
//执行这个动画导致  cellForRow一直不停的被调用,cellForRow里面有图片绘制,导致变卡了。
[UIView animateWithDuration:0.3 animations:^{
           weakSelf.photoView.transform = CGAffineTransformMakeScale(0.01, 0.01);
        } completion:^(BOOL finished) {
            [weakSelf.photoView removeFromSuperview];
        }];
//这样的动画就不会去调用CellForRow
[UIView animateWithDuration:0.3 animations:^{
            weakSelf.photoView.alpha = 0;
        } completion:^(BOOL finished) {
            [weakSelf.photoView removeFromSuperview];
            weakSelf.photoView.alpha = 1;
            weakSelf.photoView.transform = CGAffineTransformMakeScale(0.01, 0.01);
        }];

暂无其他解决办法,有不有大神能提供一下解决办法呢?

相关文章

网友评论

      本文标题:iOS 对tableView执行transform动画,导致ta

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