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 では正常に動作していますが、iOS 7 では動作しません。ペン先で UIImageView を作成しました

4

1 に答える 1

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];
    }
于 2013-09-25T07:05:16.653 に答える