redribben

Untitled

Nov 17th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  2.     //MVYSideMenu code
  3. //    [UIStoryboard storyboardWithName:@"Main_iPhone.Storyboard" bundle: nil];
  4.     UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
  5.     MenuViewController *menuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"]; //VC in my storyboard that I want as the slide out menu
  6.     UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:menuViewController];
  7.    
  8.     self.tabBarController = [self.storyboard instantiateViewControllerWithIdentifier: @"Main"];
  9.    
  10.     MVYSideMenuOptions *options = [[MVYSideMenuOptions alloc] init];
  11.     options.contentViewScale = 1.0;
  12.     options.contentViewOpacity = 0.5;
  13.     options.shadowOpacity = 0.0;
  14.     options.bezelWidth = 200;
  15.    
  16.     //tabbar is the main vc and navController has aroot view, filter view controller
  17.     MVYSideMenuController *sideBarController = [[MVYSideMenuController alloc]initWithMenuViewController:navController
  18.                                                                                   contentViewController:self.tabBarController
  19.                                                                                                 options:options];
  20.    
  21.     self.window.rootViewController = sideBarController; //Setup in the window, so its ontop of the tabbar when it shows
  22.     self.tabBarController.delegate = self;
  23.     [self.window makeKeyAndVisible];
  24.     return YES;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment