iOS关于三张图片循环淡入淡出能耗问题

T_Four 发布于 2016/06/29 19:05
阅读 349
收藏 0
iOS

-(void)starImageViewAnimation

WeakSelf(ws);

[UIView transitionWithView:_starImageViews duration:1.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{

_starImageViews.image = ws.starImage2;

} completion:^(BOOL finished) {

[UIView transitionWithView:_starImageViews duration:1.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{

_starImageViews.image = ws.starImage3;

} completion:^(BOOL finished) {

[UIView transitionWithView:_starImageViews duration:1.5 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{

_starImageViews.image = ws.starImage1;

} completion:^(BOOL finished) {

[self starImageViewAnimation];

}];

}];


}];

}


使用这个方法可以实现,但是我发现内存的消耗太大

求大神解释或者有别的方法实现

加载中
0
JeffZ
JeffZ
使用CABasicAnimation,对每张图片做间隔动画试试
T_Four
T_Four
解决了,使用CAKeyframeAnimation实现就好
返回顶部
顶部