Quantcast
Channel: Fifty Outs
Viewing all articles
Browse latest Browse all 25

Keep both view controllers in UISplitViewController portrait view

0
0
Hooray! Apple has created a UISplitViewController delegate to choose whether the master view controller is hidden or not on orientation change. If you start a project with the Master Detail application template, simple edit the [Project]DetailViewController.m file. At the bottom of this file you will find a #pragma mark - Split view, followed by all the delegate methods for the UISplitViewController. Simply add the following: -(BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation { return NO; } That will force the first view controller to stay in view upon orientation change (namely, portrait view.)

Viewing all articles
Browse latest Browse all 25

Latest Images

Trending Articles





Latest Images