-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit 61986cb
Showing
169 changed files
with
20,704 additions
and
0 deletions.
There are no files selected for viewing
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.
Binary file not shown.
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,20 @@ | ||
// | ||
// CardController.h | ||
// iValentine | ||
// | ||
// Created by MacPro on 2/8/11. | ||
// Copyright 2011 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
|
||
@interface CardController : UIViewController { | ||
IBOutlet UIImageView *cardView; | ||
id delegate; | ||
NSString *fileName; | ||
} | ||
@property (nonatomic, retain) UIImageView *cardView; | ||
@property (nonatomic, retain) NSString *fileName; | ||
- (id)initCardVC:(NSString*)imageName setDelegate:(id)new_delegate; | ||
@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,66 @@ | ||
// | ||
// CardController.m | ||
// iValentine | ||
// | ||
// Created by MacPro on 2/8/11. | ||
// Copyright 2011 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import "CardController.h" | ||
|
||
|
||
@implementation CardController | ||
@synthesize cardView,fileName; | ||
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. | ||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { | ||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
if (self) { | ||
// Custom initialization. | ||
} | ||
return self; | ||
} | ||
|
||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. | ||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
NSString* path = [[NSBundle mainBundle] pathForResource:self.fileName ofType:@"png"]; | ||
cardView.image = [UIImage imageWithContentsOfFile:path]; | ||
} | ||
|
||
/* | ||
// Override to allow orientations other than the default portrait orientation. | ||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | ||
// Return YES for supported orientations. | ||
return (interfaceOrientation == UIInterfaceOrientationPortrait); | ||
} | ||
*/ | ||
- (id)initCardVC:(NSString*)imageName setDelegate:(id)new_delegate; | ||
{ | ||
if (self = [super initWithNibName:@"CardController" bundle:nil]) { | ||
delegate = new_delegate; | ||
self.fileName = imageName; | ||
} | ||
return self; | ||
} | ||
- (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 { | ||
[super viewDidUnload]; | ||
// Release any retained subviews of the main view. | ||
// e.g. self.myOutlet = nil; | ||
} | ||
|
||
|
||
- (void)dealloc { | ||
[cardView release]; | ||
cardView = nil; | ||
[super dealloc]; | ||
} | ||
|
||
|
||
@end |
Oops, something went wrong.