Known attempt to update MGSplitViewController for iOS5 and storyboards?

I am working on an iPad application that will have to hide / show the main controller of the split view.

SO Matt Matt Gemmell MGSplitViewController Related Answers :

The MGSplitViewController would be ideal - even providing a way to customize the master-part view relationship.

Fantastic! Also, it does not play well with the latest Xcode, using storyboards and ARC.

I see a transfer request (from 9 months ago) to convert to ARC for iOS4 , but this still leaves him with the need for some storyboard work.

Does anyone know of ongoing efforts to upgrade this pearl of open source to behave properly in the latest iOS development environment?

Otherwise, examples / tutorials on how to integrate it into the Xcode / iOS5 storyboard project will be very helpful.

+3
source share
2 answers

It seems that if you wait long enough, every good package will attract attention.

Thanks again to Matt Gemmell for the excellent package and the fame of Heath Borders for the initiative.

Heath Borders Port for iOS 5.1

+2
source

. , , , DidFinishLaunching :

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil];

    self.masterController = [storyboard instantiateViewControllerWithIdentifier:@"masterController"];
    self.detailController = [storyboard instantiateViewControllerWithIdentifier:@"detailController"];

    self.splitViewController = [[MGSplitViewController alloc] init];
    self.splitViewController.masterViewController = self.masterController;
    self.splitViewController.detailViewController = self.detailController;
    ACALandingVC* landingVC = [self.detailController.childViewControllers objectAtIndex:0];
    landingVC.splitController = self.splitViewController;
    self.splitViewController.delegate = landingVC;

    //self.splitViewController.splitWidth = 5;
    self.splitViewController.allowsDraggingDivider = YES;
    self.splitViewController.dividerStyle = MGSplitViewDividerStylePaneSplitter;
    self.splitViewController.splitPosition = 350;
    self.splitViewController.splitWidth = 10;


    self.window.rootViewController = self.splitViewController;
}
else {
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
    UITabBarController* firstVC = [storyboard instantiateInitialViewController];
    self.window.rootViewController = firstVC;
    [[UINavigationBar appearance] setTintColor:[UIColor lightGrayColor]];
}

[self.window makeKeyAndVisible];

My AppDelegate.h :

@class MGSplitViewController;

@interface ACAAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, strong) MGSplitViewController* splitViewController;
@property (nonatomic, strong) UITabBarController* masterController;
@property (nonatomic, strong) UINavigationController* detailController;

@end
+2

All Articles