forked from honcheng/PaperFoldMenuController
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first commit, with a working menu controller. uses containment view
- Loading branch information
Showing
22 changed files
with
970 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "PaperFoldMenuController/PaperFold"] | ||
path = PaperFoldMenuController/PaperFold | ||
url = https://github.com/honcheng/PaperFold-for-iOS.git |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// AppDelegate.h | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "DemoMenuController.h" | ||
|
||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
|
||
@property (strong, nonatomic) UIWindow *window; | ||
@property (nonatomic, strong) DemoMenuController *menuController; | ||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// AppDelegate.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
#import "FirstViewController.h" | ||
#import "SecondViewController.h" | ||
#import "ThirdViewController.h" | ||
|
||
@implementation AppDelegate | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | ||
|
||
_menuController = [[DemoMenuController alloc] initWithMenuWidth:250.0]; | ||
[self.window setRootViewController:_menuController]; | ||
|
||
NSMutableArray *viewControllers = [NSMutableArray array]; | ||
|
||
FirstViewController *firstViewController = [[FirstViewController alloc] init]; | ||
[firstViewController setTitle:@"First View Controller"]; | ||
UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:firstViewController]; | ||
[viewControllers addObject:firstNavController]; | ||
|
||
SecondViewController *secondViewController = [[SecondViewController alloc] init]; | ||
[secondViewController setTitle:@"Second View Controller"]; | ||
UINavigationController *secondNavController = [[UINavigationController alloc] initWithRootViewController:secondViewController]; | ||
[viewControllers addObject:secondNavController]; | ||
|
||
ThirdViewController *thirdViewController = [[ThirdViewController alloc] init]; | ||
[thirdViewController setTitle:@"Third View Controller"]; | ||
UINavigationController *thirdNavController = [[UINavigationController alloc] initWithRootViewController:thirdViewController]; | ||
[viewControllers addObject:thirdNavController]; | ||
|
||
[_menuController setViewControllers:viewControllers]; | ||
|
||
self.window.backgroundColor = [UIColor whiteColor]; | ||
[self.window makeKeyAndVisible]; | ||
return YES; | ||
} | ||
|
||
@end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundleExecutable</key> | ||
<string>${EXECUTABLE_NAME}</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.honcheng.${PRODUCT_NAME:rfc1034identifier}</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>${PRODUCT_NAME}</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>LSRequiresIPhoneOS</key> | ||
<true/> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>armv7</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
</array> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// Prefix header for all source files of the 'Demo' target in the 'Demo' project | ||
// | ||
|
||
#import <Availability.h> | ||
|
||
#ifndef __IPHONE_3_0 | ||
#warning "This project uses features only available in iOS SDK 3.0 and later." | ||
#endif | ||
|
||
#ifdef __OBJC__ | ||
#import <UIKit/UIKit.h> | ||
#import <Foundation/Foundation.h> | ||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// DemoMenuController.h | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
#import "PaperFoldMenuController.h" | ||
|
||
@interface DemoMenuController : PaperFoldMenuController | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// DemoMenuController.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import "DemoMenuController.h" | ||
|
||
@interface DemoMenuController () | ||
|
||
@end | ||
|
||
@implementation DemoMenuController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// FirstViewController.h | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface FirstViewController : UIViewController | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// FirstViewController.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import "FirstViewController.h" | ||
|
||
@interface FirstViewController () | ||
|
||
@end | ||
|
||
@implementation FirstViewController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// SecondViewController.h | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface SecondViewController : UIViewController | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// SecondViewController.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import "SecondViewController.h" | ||
|
||
@interface SecondViewController () | ||
|
||
@end | ||
|
||
@implementation SecondViewController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// ThirdViewController.h | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ThirdViewController : UIViewController | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// ThirdViewController.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import "ThirdViewController.h" | ||
|
||
@interface ThirdViewController () | ||
|
||
@end | ||
|
||
@implementation ThirdViewController | ||
|
||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
{ | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization | ||
} | ||
return self; | ||
} | ||
|
||
- (void)viewDidLoad | ||
{ | ||
[super viewDidLoad]; | ||
// Do any additional setup after loading the view. | ||
} | ||
|
||
- (void)didReceiveMemoryWarning | ||
{ | ||
[super didReceiveMemoryWarning]; | ||
// Dispose of any resources that can be recreated. | ||
} | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* Localized versions of Info.plist keys */ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// main.m | ||
// Demo | ||
// | ||
// Created by honcheng on 26/10/12. | ||
// Copyright (c) 2012 Hon Cheng Muh. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
#import "AppDelegate.h" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
@autoreleasepool { | ||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); | ||
} | ||
} |
Oops, something went wrong.