开发者

our fade animation freezes button & slider controls

I have a simple photo transition on an iPad program that precludes operator interaction during the transition. The 2 photos are approx 200kb each and the fade is by changing their alphas with the following code;

-(void)phot开发者_Go百科oLoopAnimation
{
// FADE block animation method - THIS contains the basic animation features 
[UIView animateWithDuration:5.2 delay:delaySeconds 
            options:UIViewAnimationOptionTransitionNone         
            animations:^{
                    viewTop.alpha = 0.0;
                viewBottom.alpha = 1.0;
                 }
            completion:^(BOOL finished) {   // remove both views & loop 
                [viewTop removeFromSuperview];  
                [viewBottom removeFromSuperview];
                [viewTop release];
                [viewBottom release];
                [self photoLoop];
    //[self performSelectorInBackground:(@selector(photoLoop)) withObject:nil];
                 }];    
}

My understanding is that the animation block works as a background thread (task?), & shouldn't lock control of the app while it is executing. Can anyone offer any incite? (insight) Thanks, CPL


Try adding the UIViewAnimationOptionAllowUserInteraction option if your controls are being animated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜