tags:

views:

31

answers:

1

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 setAnimationDuration: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 appdelegate.I want to avoid window in forView.If i give window instead of forView:parVC.view , it works fine....

A: 

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

Brian
cant i use normal view instead of UIWindow?
Mikhail Naimy
Sure, you can add a view to the window and then add to rest of your views to that view
Brian