0
votes

When we open the application very first time in portrait or landscape view it shows the master view in splitviewcontroller,But when we rotate the screen from landscape to portrait it hides the master view and from portrait to landscape it shows the master view and vice versa.

Can anyone help me to tell that i want to show the master view in both the orientation.

1

1 Answers

3
votes

The split view controller automatically decides the most appropriate display mode based on the device and the current app size. You can assign this constant as the value of the preferredDisplayMode property but this value is never reported by the displayMode property.

Available in iOS 8.0 and later.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
   // Override point for customization after application launch.
    UISplitViewController *splitViewController = (UISplitViewController*)self.window.rootViewController;
    splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModePrimaryOverlay;
   return YES;
}