Created
February 18, 2013 20:33
-
-
Save rnystrom/4980453 to your computer and use it in GitHub Desktop.
Setting up RNSwipeViewController in code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// PTMasterController is a subclass of RNSwipeViewController | |
PTMasterController *masterController = [[PTMasterController alloc] init]; | |
PTSchemeController *scheme = [[PTSchemeController alloc] init]; | |
PTUtilityController *utility = [[PTUtilityController alloc] init]; | |
PTWritingController *writing = [[PTWritingController alloc] init]; | |
masterController.centerViewController = writing; | |
masterController.rightViewController = utility; | |
masterController.leftViewController = scheme; | |
masterController.leftVisibleWidth = kGridSize + 3 * kPadding; | |
masterController.rightVisibleWidth = kGridSize * 2 + 3 * kPadding; | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.rootViewController = masterController; | |
self.window.backgroundColor = [UIColor underPageBackgroundColor]; | |
[self.window makeKeyAndVisible]; | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment