Skip to content

Commit

Permalink
Changed demo code format
Browse files Browse the repository at this point in the history
  • Loading branch information
yichizhang committed Nov 24, 2014
1 parent c5391b8 commit 2343d49
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,33 @@ Simply use [CocoaPods](http://cocoapods.org/):
## Usage

```objc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
@property (strong) YZSwipeBetweenViewController *swipeBetweenVC;

- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

self.swipeBetweenVC = [YZSwipeBetweenViewController new];

UIViewController *vc1 = [DemoMainViewController new];
UINavigationController *navCon1 = [[UINavigationController alloc] initWithRootViewController:vc1];
UINavigationController *navCon1 =
[[UINavigationController alloc]initWithRootViewController:vc1];

UIViewController *vc2 = [DemoMainViewController new];
UINavigationController *navCon2 = [[UINavigationController alloc] initWithRootViewController:vc2];
UINavigationController *navCon2 =
[[UINavigationController alloc] initWithRootViewController:vc2];

UIViewController *vc3 = [DemoMainViewController new];
UINavigationController *navCon3 = [[UINavigationController alloc] initWithRootViewController:vc3];
UINavigationController *navCon3 =
[[UINavigationController alloc] initWithRootViewController:vc3];

self.swipeBetweenVC.viewControllers =
@[
navCon1,
navCon2,
navCon3
];
self.swipeBetweenVC.viewControllers = @[navCon1, navCon2, navCon3];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
[self.window setRootViewController:self.swipeBetweenVC];
[self.window makeKeyAndVisible];

return YES;

}
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,25 @@ @interface AppDelegate ()
@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

self.swipeBetweenVC = [YZSwipeBetweenViewController new];

UIViewController *vc1 = [DemoMainViewController new];
UINavigationController *navCon1 = [[UINavigationController alloc] initWithRootViewController:vc1];
UINavigationController *navCon1 =
[[UINavigationController alloc]initWithRootViewController:vc1];

UIViewController *vc2 = [DemoMainViewController new];
UINavigationController *navCon2 = [[UINavigationController alloc] initWithRootViewController:vc2];
UINavigationController *navCon2 =
[[UINavigationController alloc] initWithRootViewController:vc2];

UIViewController *vc3 = [DemoMainViewController new];
UINavigationController *navCon3 = [[UINavigationController alloc] initWithRootViewController:vc3];
UINavigationController *navCon3 =
[[UINavigationController alloc] initWithRootViewController:vc3];

self.swipeBetweenVC.viewControllers =
@[
navCon1,
navCon2,
navCon3
];
self.swipeBetweenVC.viewControllers = @[navCon1, navCon2, navCon3];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
Expand Down

0 comments on commit 2343d49

Please sign in to comment.