Change the width of Master in UISplitViewController

If you subclass UISplitViewController, you can implement -viewDidLayoutSubviews and adjust the width there. This is clean, no hacks or private APIs, and works even with rotation. – (void)viewDidLayoutSubviews { const CGFloat kMasterViewWidth = 240.0; UIViewController *masterViewController = [self.viewControllers objectAtIndex:0]; UIViewController *detailViewController = [self.viewControllers objectAtIndex:1]; if (detailViewController.view.frame.origin.x > 0.0) { // Adjust the width of the … Read more

Best way to switch between UISplitViewController and other view controllers?

I seriously didn’t believe that this concept of having some UIViewController to show before UISplitViewController (login form for example) turns out to be so complicated, until I had to create that kind of view hiearchy. My example is based on iOS 8 and XCode 6.0 (Swift), so I’m not sure if this problem existed before … Read more

UISplitViewController in portrait on iPhone shows detail VC instead of master

Oh man, this was causing me a headache for a few days and could not figure out how to do this. The worst part was that creating a new Xcode iOS project with the master-detail template worked just fine. Fortunately, in the end, that little fact was how I found the solution. There are some … Read more

SplitView like Facebook app on iPhone

Facebook guys have done brilliant job in the new version of the app. The similar open source code can be found from here – JTRevealSidebarDemo. Please note that as of June 2014, this project has been discontinued, so you’ll probably have better luck with a project from the list below. It reveals technique behind doing … Read more