开发者

UIView setAnimationTransition is not working?

i have added one view in UIwindow as [window addSubview:parVC.view];

i toggle the parVC.view through the following , but it is not working

- (IBAction)flipToback:(id)sender
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAn开发者_StackOverflow中文版imationDuration:1.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft 
                           forView:parVC.view 
                             cache:YES];
    [parVC.view addSubview:imgController.view];
    [UIView commitAnimations];
}

I have set correctly imgController.view in IB in app delegate. I want to avoid window in forView. If i give window instead of forView:parVC.view , it works fine....


That sounds like the correct behavior to me. setAnimationTransition:forView:cache: operates on the container view, not the one you're adding.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜