Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Edward Patel
authored and
Edward Patel
committed
Feb 28, 2010
0 parents
commit b040563
Showing
24 changed files
with
2,498 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,20 @@ | |||
// | |||
// DemoProjectAppDelegate.h | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
@class MainViewController; | |||
|
|||
@interface DemoProjectAppDelegate : NSObject <UIApplicationDelegate> { | |||
UIWindow *window; | |||
MainViewController *mainViewController; | |||
} | |||
|
|||
@property (nonatomic, retain) IBOutlet UIWindow *window; | |||
@property (nonatomic, retain) MainViewController *mainViewController; | |||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,37 @@ | |||
// | |||
// DemoProjectAppDelegate.m | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "DemoProjectAppDelegate.h" | |||
#import "MainViewController.h" | |||
|
|||
@implementation DemoProjectAppDelegate | |||
|
|||
|
|||
@synthesize window; | |||
@synthesize mainViewController; | |||
|
|||
|
|||
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |||
|
|||
MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; | |||
self.mainViewController = aController; | |||
[aController release]; | |||
|
|||
mainViewController.view.frame = [UIScreen mainScreen].applicationFrame; | |||
[window addSubview:[mainViewController view]]; | |||
[window makeKeyAndVisible]; | |||
} | |||
|
|||
|
|||
- (void)dealloc { | |||
[mainViewController release]; | |||
[window release]; | |||
[super dealloc]; | |||
} | |||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
// | |||
// FlipsideView.h | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
@interface FlipsideView : UIView { | |||
|
|||
} | |||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
// | |||
// FlipsideView.m | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "FlipsideView.h" | |||
|
|||
@implementation FlipsideView | |||
|
|||
|
|||
- (id)initWithFrame:(CGRect)frame { | |||
if (self = [super initWithFrame:frame]) { | |||
// Initialization code | |||
} | |||
return self; | |||
} | |||
|
|||
|
|||
- (void)drawRect:(CGRect)rect { | |||
// Drawing code | |||
} | |||
|
|||
|
|||
- (void)dealloc { | |||
[super dealloc]; | |||
} | |||
|
|||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
// | |||
// FlipsideViewController.h | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
@protocol FlipsideViewControllerDelegate; | |||
|
|||
|
|||
@interface FlipsideViewController : UIViewController { | |||
id <FlipsideViewControllerDelegate> delegate; | |||
} | |||
|
|||
@property (nonatomic, assign) id <FlipsideViewControllerDelegate> delegate; | |||
- (IBAction)done; | |||
|
|||
@end | |||
|
|||
|
|||
@protocol FlipsideViewControllerDelegate | |||
- (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller; | |||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,54 @@ | |||
// | |||
// FlipsideViewController.m | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "FlipsideViewController.h" | |||
|
|||
|
|||
@implementation FlipsideViewController | |||
|
|||
@synthesize delegate; | |||
|
|||
|
|||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor]; | |||
} | |||
|
|||
|
|||
- (IBAction)done { | |||
[self.delegate flipsideViewControllerDidFinish:self]; | |||
} | |||
|
|||
|
|||
/* | |||
// Override to allow orientations other than the default portrait orientation. | |||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |||
// Return YES for supported orientations | |||
return (interfaceOrientation == UIInterfaceOrientationPortrait); | |||
} | |||
*/ | |||
|
|||
- (void)didReceiveMemoryWarning { | |||
// Releases the view if it doesn't have a superview. | |||
[super didReceiveMemoryWarning]; | |||
|
|||
// Release any cached data, images, etc that aren't in use. | |||
} | |||
|
|||
- (void)viewDidUnload { | |||
// Release any retained subviews of the main view. | |||
// e.g. self.myOutlet = nil; | |||
} | |||
|
|||
|
|||
- (void)dealloc { | |||
[super dealloc]; | |||
} | |||
|
|||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
// | |||
// MainView.h | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import <UIKit/UIKit.h> | |||
|
|||
@interface MainView : UIView { | |||
|
|||
} | |||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
// | |||
// MainView.m | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "MainView.h" | |||
|
|||
@implementation MainView | |||
|
|||
|
|||
- (id)initWithFrame:(CGRect)frame { | |||
if (self = [super initWithFrame:frame]) { | |||
// Initialization code | |||
} | |||
return self; | |||
} | |||
|
|||
|
|||
- (void)drawRect:(CGRect)rect { | |||
// Drawing code | |||
} | |||
|
|||
|
|||
- (void)dealloc { | |||
[super dealloc]; | |||
} | |||
|
|||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
// | |||
// MainViewController.h | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "FlipsideViewController.h" | |||
|
|||
@interface MainViewController : UIViewController <FlipsideViewControllerDelegate> { | |||
} | |||
|
|||
- (IBAction)showInfo; | |||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,97 @@ | |||
// | |||
// MainViewController.m | |||
// DemoProject | |||
// | |||
// Created by Edward Patel on 2010-02-28. | |||
// Copyright Memention AB 2010. All rights reserved. | |||
// | |||
|
|||
#import "MainViewController.h" | |||
#import "MainView.h" | |||
|
|||
#import "DemoTransition.h" | |||
|
|||
@implementation MainViewController | |||
|
|||
|
|||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { | |||
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { | |||
// Custom initialization | |||
} | |||
return self; | |||
} | |||
|
|||
|
|||
/* | |||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
} | |||
*/ | |||
|
|||
|
|||
/* | |||
// Override to allow orientations other than the default portrait orientation. | |||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |||
// Return YES for supported orientations | |||
return (interfaceOrientation == UIInterfaceOrientationPortrait); | |||
} | |||
*/ | |||
|
|||
|
|||
- (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller { | |||
|
|||
[self dismissModalViewControllerAnimated:YES]; | |||
} | |||
|
|||
|
|||
- (IBAction)showInfo { | |||
|
|||
FlipsideViewController *controller = [[FlipsideViewController alloc] | |||
initWithNibName:@"FlipsideView" | |||
bundle:nil]; | |||
controller.delegate = self; | |||
|
|||
DemoTransition *transition = [[[DemoTransition alloc] init] autorelease]; | |||
|
|||
EPGLTransitionView *glview = [[EPGLTransitionView alloc] | |||
initWithWindow:self.view.window | |||
delegate:transition]; | |||
|
|||
[glview autorelease]; | |||
[glview startAnimation]; | |||
|
|||
[self presentModalViewController:controller animated:NO]; | |||
|
|||
[controller release]; | |||
} | |||
|
|||
|
|||
|
|||
/* | |||
// Override to allow orientations other than the default portrait orientation. | |||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |||
// Return YES for supported orientations | |||
return (interfaceOrientation == UIInterfaceOrientationPortrait); | |||
} | |||
*/ | |||
|
|||
- (void)didReceiveMemoryWarning { | |||
// Releases the view if it doesn't have a superview. | |||
[super didReceiveMemoryWarning]; | |||
|
|||
// Release any cached data, images, etc that aren't in use. | |||
} | |||
|
|||
- (void)viewDidUnload { | |||
// Release any retained subviews of the main view. | |||
// e.g. self.myOutlet = nil; | |||
} | |||
|
|||
|
|||
- (void)dealloc { | |||
[super dealloc]; | |||
} | |||
|
|||
|
|||
@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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
<?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>English</string> | |||
<key>CFBundleDisplayName</key> | |||
<string>${PRODUCT_NAME}</string> | |||
<key>CFBundleExecutable</key> | |||
<string>${EXECUTABLE_NAME}</string> | |||
<key>CFBundleIconFile</key> | |||
<string></string> | |||
<key>CFBundleIdentifier</key> | |||
<string>com.yourcompany.${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>CFBundleSignature</key> | |||
<string>????</string> | |||
<key>CFBundleVersion</key> | |||
<string>1.0</string> | |||
<key>LSRequiresIPhoneOS</key> | |||
<true/> | |||
<key>NSMainNibFile</key> | |||
<string>MainWindow</string> | |||
</dict> | |||
</plist> |
Oops, something went wrong.