Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

whitedragon101

macrumors 65816
Original poster
Sep 11, 2008
1,349
339
The split view controller has a two column layout the master column on the left and the detail on the right. I want to be able to set the width of the columns.

I came across this solution in stack overflow. It works but does not respond to numbers over 410 which means I can't make the split 50/50. Any ideas why it is limiting me and how I get around it? Thanks

edit: This is an iPad only project not iPhone

From stack overflow

Code:
In IOS 8.0 you can easily do this by doing the following:

In your MasterSplitViewController.h add

@property(nonatomic, assign) CGFloat maximumPrimaryColumnWidth NS_AVAILABLE_IOS(8_0);

In your MasterSplitViewController.m viewDidLoad method add

self.maximumPrimaryColumnWidth = 100; self.splitViewController.maximumPrimaryColumnWidth = self.maximumPrimaryColumnWidth;

This is a really good, simple and easy feature of IOS 8.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.