Changing interface orientation of parentviewcontroller
I have a ViewController1 on iPad which presents another ViewController2 modaly using presentModalViewCotroller.
UIViewController* viewController2 = [[VideosViewController alloc] init];
viewCont开发者_开发百科roller2.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:viewController2 animated:YES];
[viewController2 release];
But the ViewController2 has some parts that are semi translucent. So with the ViewController 2 already on screen, if i rotate the device 90 degrees, the Interface Orientation of ViewController2 changes appropriately, but the orientation of the Viewcontroller1 which is still visible in background does not change. I want the ViewController1 to change its Interface orientation along with ViewController2. Any suggestions?
Thanks in advance
I realised that it would have been much better if i simply used the UIModalPresentationFormSheet modalPresentationStyle on viewController2 because semi translucency that i was trying to achieve was anyway similar to form sheets. What I mean by this is that a viewController2 presented as form sheet also rotates the presenting viewController1 which is still visible in the background.
精彩评论