Now I'm testing an app for the iPad. Basically I'm using a template for the master extension app and another portrait controller now when the image starts in portrait mode, then I want to display it only portrait view controller and when the device is rotated, the example Landscape mode I only want to display master-detail view controller. What is the best way to do this?
I was testing the sample code for a single visual application, but refuses to hide the master-detail view:
- (zero) WillmentToTotationInterfaceArrayation : (UIInterfaceOrientation) Interface Transfer Period: (NSTimeInterval) Period {if (Interface Orientation == UIInterfaceOrientationPortrait} {self.view = self.portrait; Self.view.transform = CGAffineTransformIdentity; Self.view.transform = CGF TransformMarketation (Degreered (0)); Self.view.bounds = CGRectMake (0.0, 0.0, 320.0, 460.0); } And if (Interface Orientation == UINPfaceOrmentation Landscape Lift) {self.view = self.landscape; Self.view.transform = CGAffineTransformIdentity; Self.view.transform = Cegiphen Transmembratorization (DegreesToradiades ("90"); Self.view.bounds = CGRectMake (0.0, 0.0, 480.0, 300.0); } And if (Interface Orientation == UINTERFACTATION LandscapeRight) {self.view = self.landscape; Self.view.transform = CGAffineTransformIdentity; Self.view.transform = Cegipeen Transmembration Radiation (Degrees (90)); Self.view.bounds = CGRectMake (0.0, 0.0, 480.0, 300.0); }}
The view controller should not change its view in real time. You are not seeing anything because the old views of the view controller are still in the interface; You are not removing it from the interface nor should you do this. The way to do this is to swap the view controller ; Use a different view controller and a different view. If you started with Master-Detail View Controller, this is the view (partition view) that the app's root view controller is UISplitViewController, it appears that is the view that you want to delete. So you have to change UISplitViewController as the window's rootViewController . But this is a big pain in the butt. I think you can be happy to put a model (presented) view controller in front of everyone in Portrait Orientation.
This is a downloadable example that presents a visual controller in response to the device rotation:
No comments:
Post a Comment