Advertisement
Guest User

SWReveal

a guest
Jan 6th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  2.     self.window = window;
  3.    
  4.     UIViewController *rootcontroller = [[UIViewController alloc] init];
  5.     CGRect frame = [[UIScreen mainScreen] applicationFrame];
  6.     rootcontroller.view.frame = frame;
  7.    
  8.     FrontViewController *frontViewController = [[FrontViewController alloc] init];
  9.     RearViewController *rearViewController = [[RearViewController alloc] init];
  10.    
  11.     UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:frontViewController];
  12.    
  13.     SWRevealViewController *revealController = [[SWRevealViewController alloc] initWithRearViewController:rearViewController frontViewController:navigationController];
  14.     revealController.delegate = self;
  15.  
  16.     self.viewController = revealController;
  17.    
  18.     self.window.rootViewController = rootcontroller;
  19.    
  20.    
  21.     [rootcontroller.view addSubview:self.viewController.view];
  22.    
  23.     [self.window makeKeyAndVisible];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement