Guest User

SUP, APP

a guest
Apr 10th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "VSAppDelegate.h"  
  2.  
  3. @implementation VSAppDelegate
  4.  
  5. #pragma mark - Lifecycle
  6.  
  7. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  8. {
  9.     [Crashlytics startWithAPIKey:@"93***********************2d"];
  10.    
  11.     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  12.     self.window.rootViewController = [self rootController];
  13.     [self.window makeKeyAndVisible];
  14.    
  15.     return YES;
  16. }
  17.  
  18. #pragma mark - Controllers
  19.  
  20. - (PKRevealController *)rootController {
  21.     NSDictionary *options = @{ PKRevealControllerRecognizesPanningOnFrontViewKey:[NSNumber numberWithBool:NO] };
  22.    
  23.     return [PKRevealController revealControllerWithFrontViewController:[self frontController]
  24.                                                     leftViewController:[VSStarredStatusesViewController sharedInstance]
  25.                                                    rightViewController:[[Vkontakte sharedInstance] authenticateController]
  26.                                                                options:options];
  27. }
  28.  
  29. - (UINavigationController *)frontController {
  30.     MBPullDownController *pullDownController = [[MBPullDownController alloc] initWithFrontController:[VSStatusesViewController sharedInstance]
  31.                                                                                       backController:[VSCategoriesViewController sharedInstance]];
  32.     pullDownController.closeDragOffset = 45.0f;
  33.     pullDownController.closedTopOffset = 45.0f;
  34.     pullDownController.openBottomOffset = 45.0f;
  35.    
  36.     UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:pullDownController];
  37.     navigationController.navigationBarHidden = YES;
  38.    
  39.     return navigationController;
  40. }
  41.  
  42. @end
Advertisement
Add Comment
Please, Sign In to add comment