0

So I am trying to build an iPhone app that uses a SplitView for the main screen Similar to the app Lyft or like basically this controller https://github.com/mutualmobile/MMDrawerController.

I have set up the following storyboard (I am not using SizeClasses) :

enter image description here

I have subclassed the SplitViewController to try to set a max width for my MasterViewController:

// File .h

#import <UIKit/UIKit.h>

@interface LLSplitViewController : UISplitViewController <UISplitViewControllerDelegate>

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

@end

// File .m

@implementation LLSplitViewController

-(void)viewDidLoad{

    self.delegate = self;
    self.preferredPrimaryColumnWidthFraction = .1;
    CGRect mainScreen = [[UIScreen mainScreen] bounds];
    self.maximumPrimaryColumnWidth = mainScreen.size.width - 100;
}

@end

What am I missing here?

jonypz
  • 1,405
  • 1
  • 17
  • 35

1 Answers1

0

I ended up using this framework to achieve my goal.

It is not a splitcontroller but it works similar to it and it seems to be very well maintained.

jonypz
  • 1,405
  • 1
  • 17
  • 35