Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SplitView for ipad and menu drawer for iPhone

Im developing one Universal app (for iPhone and iPad both). Following is the requirement of app .

Requirement

1.There should be a menu (master on the left) and detail (on the right).

2.For iPhone menu or masterViewController should be on drawer or on slide out menu. Drawer or slid out menu

3.For iPad menu should be on rootViewController of splitView. menu in master of splitViewController

i have already tried

I tried to implement it using spiltViewController, for iPad it is working fine (MasterViewController is coming on left of the screen and DetailViewController is on right side of the screen ) but for iPhone it is simply working as UINavigationController (MasterViewController controller as rootViewController of UINavigationController).

what approach should i use to implement it?

like image 710
Wali Haider Avatar asked May 05 '15 04:05

Wali Haider


1 Answers

Since iOS8 you can use UISplitViewController for this purpose.

The solution starts at 14:00 aprox in this WWDC 2014 video: View Controller Advancements in iOS8

More info at: http://coding.tabasoft.it/ios/the-new-uisplitviewcontroller/

like image 169
crubio Avatar answered Oct 06 '22 13:10

crubio