Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UIImageview在iOS7中没有设置动画,但在iOS6中工作良好_Iphone_Ios_Animation_Uiimageview_Ios7 - Fatal编程技术网

Iphone UIImageview在iOS7中没有设置动画,但在iOS6中工作良好

Iphone UIImageview在iOS7中没有设置动画,但在iOS6中工作良好,iphone,ios,animation,uiimageview,ios7,Iphone,Ios,Animation,Uiimageview,Ios7,这在iOS 6中运行良好,但在iOS 7中不起作用。我已经在nib中创建了UIImageView,它应该可以工作,如果延迟一段时间后没有调用该方法 revealImgView.animationImages =[NSArray arrayWithObjects:[UIImage imageNamed:@"reveal1.png"],[UIImage imageNamed:@"reveal2.png"],[UIImage imageNamed:@"reveal3.png"],[UIImage im

这在iOS 6中运行良好,但在iOS 7中不起作用。我已经在nib中创建了UIImageView,它应该可以工作,如果延迟一段时间后没有调用该方法

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];

什么错误?。有日志吗?@AllinAllAzahguraja-他们没有错误,我已经做过很多次了,但是没有在IOS7中工作。请解释一下你在getAllImgViewAnimating上面写的代码,为什么要这样做added@AshutoshMishra-我刚刚给了0.5秒的延迟,并调用了将uiimageview设置动画的方法。可能是用户已将所有内容放入viewdidLoad
        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];
    }