简体   繁体   中英

UIView animation repeatcount for multi view

I want to apply the wiggle animation more than 10 elements.It's working fine for 6 - 9 elements. If the element goes more than 10 wiggle apply successfully but, if I press home button while animation app not response.

My code is:

while(subviews)
{
    [UIView beginAnimations:@"wiggle" context:nil];

    [UIView setAnimationDuration:0.1];

    [UIView setAnimationRepeatAutoreverses:YES];

    [UIView setAnimationRepeatCount:FLT_MAX];

        //wiggle 1 degree both sides
    touchView.transform = CGAffineTransformMakeRotation(0.0174532925);

    touchView.transform = CGAffineTransformMakeRotation(-0.0174532925);

    [UIView commitAnimations];
}

在应用程序委托中保留对视图的引用,并取消applicationWillResignActive:上的所有动画。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM