views:

344

answers:

1

Hello all, a short question.

I've created an app for the iPad, much like a utility app for the iPhone (one mainView, one flipSideView). The animation between them is UIModalTransitionStylePartialCurl. shouldAutorotateToInterfaceOrientation is returning YES.

If I rotate the device BEFORE entering the FlipSide, everything is okay and the PartialCurl is displayed okay. But if I enter the FlipSide and then rotate the device, while the UIElements do rotate and position themselves just fine, the actual "page curl" stays with its initial orientation. it just won't budge :)

Is it a known issue? am I doing something wrong? Thanks!

A: 

I too had this issue and somewhat gave up. However, I mentioned my dilemma to a friend, who encouraged me to look into the child VC's logic and I recalled a handy trick that I've used to pass data between parent/child view controllers.

In your flipside view controller, create a "rootViewController" property. In your parent view controller, when you initialize the flipside view controller, you set (where "self" is the rootVC):

    flipsideController.rootViewController = self;

You then use this for your flipside VC's shouldAutorotateToInterfaceOrientation method:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return interfaceOrientation == self.rootViewController.interfaceOrientation;

}

Viola! The flipside view no longer rotates underneath the partially curled up parent view!