2013-09-25 29 views
3
做工不错
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]; 

这是工作在iOS 6中良好的BT未在iOS中7的工作我已经做了的UIImageView在笔尖的UIImageView不iOS7动画,但在iOS6的

+0

什么错误?任何日志? – Vinodh

+0

@ AllinAllAzahguraja-他们是没有错误,我做了很多次,但没有在iOS7中工作 – iOS

回答

5

它应该工作,如果没有调用方法延迟一段时间后,

 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]; 
    } 
+0

伟大..其工作 – iOS

+0

请解释你的代码,这是上面写的getAllImgViewAnimating,为什么要添加 – iEinstein

+0

@ AshutoshMishra-我刚刚给.5秒的延迟,并调用将动画uiimageview动画的方法。可能是用户已经把所有的东西放在viewdidLoad中 –