Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Patel authored and Edward Patel committed Feb 28, 2010
0 parents commit b040563
Show file tree
Hide file tree
Showing 24 changed files with 2,498 additions and 0 deletions.
20 changes: 20 additions & 0 deletions DemoProject/Classes/DemoProjectAppDelegate.h
@@ -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

37 changes: 37 additions & 0 deletions DemoProject/Classes/DemoProjectAppDelegate.m
@@ -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
13 changes: 13 additions & 0 deletions DemoProject/Classes/FlipsideView.h
@@ -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
32 changes: 32 additions & 0 deletions DemoProject/Classes/FlipsideView.m
@@ -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
25 changes: 25 additions & 0 deletions DemoProject/Classes/FlipsideViewController.h
@@ -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

54 changes: 54 additions & 0 deletions DemoProject/Classes/FlipsideViewController.m
@@ -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
15 changes: 15 additions & 0 deletions DemoProject/Classes/MainView.h
@@ -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
32 changes: 32 additions & 0 deletions DemoProject/Classes/MainView.m
@@ -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
16 changes: 16 additions & 0 deletions DemoProject/Classes/MainViewController.h
@@ -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
97 changes: 97 additions & 0 deletions DemoProject/Classes/MainViewController.m
@@ -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
30 changes: 30 additions & 0 deletions DemoProject/DemoProject-Info.plist
@@ -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>

0 comments on commit b040563

Please sign in to comment.