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

2018-11-29  本文已影响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);
        }];

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

上一篇 下一篇

猜你喜欢

热点阅读