2012-10-17 47 views

回答

1

你只需要包括UIViewAnimationOptionAllowUserInteraction選項調用動畫時:

[UIView animateWithDuration:animationDuration 
          delay:0 
         options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction) 
        <snip>]; 
+0

它不工作。 – Rais

0
CATransition *animation = [CATransition animation]; 
    [animation setDelegate:self]; 
    [animation setType:kCATransitionFade]; 
    [animation setDuration:0.0];// try 0.1 also 
    [animation setTimingFunction:[CAMediaTimingFunction functionWithName: 
            kCAMediaTimingFunctionEaseInEaseOut]]; 
    [[yourImageView layer] addAnimation:animation forKey:@"transitionViewAnimation"];//Try self.view insted of yourImageView if you want to animate whole view 
相關問題