iOS*_*iOS 3 iphone animation uiimageview ios ios7
revealImgView.animationImages =[NSArray arrayWithObjects:[UIImage imageNamed:@"reveal1.png"],[UIImage imageNamed:@"reveal2.png"],[UIImage imageNamed:@"reveal3.png"],[UIImage imageNamed:@"reveal4.png"],[UIImage imageNamed:@"reveal5.png"],nil];
revealImgView.animationDuration=1.5;
revealImgView.animationRepeatCount=INFINITY;
[revealImgView startAnimating];
Run Code Online (Sandbox Code Playgroud)
这在iOS 6中运行良好,但在iOS 7中无效.我已经在笔尖中创建了UIImageView
它应该工作,如果不延迟后调用该方法,
double delayInSeconds = 0.5;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self getAllImgViewAnimating];
});
-(void)getAllImgViewAnimating
{
revealImgView.animationImages =[NSArray arrayWithObjects:[UIImage imageNamed:@"reveal1.png"],[UIImage imageNamed:@"reveal2.png"],[UIImage imageNamed:@"reveal3.png"],[UIImage imageNamed:@"reveal4.png"],[UIImage imageNamed:@"reveal5.png"],nil];
revealImgView.animationDuration=1.5;
revealImgView.animationRepeatCount=INFINITY;
[revealImgView startAnimating];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2057 次 |
| 最近记录: |