-
-
Save beelsebob/6263814 to your computer and use it in GitHub Desktop.
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
... All of foundation's headers ... | |
@interface MyQuiz : NSObject | |
@property (nonatomic, strong) NSMutableArray *quoteArray; | |
-(id) initWithTheQuiz : (NSString *) plistName; | |
@end | |
@implementation MyQuiz | |
-(id) initWithTheQuiz:(NSString *)plistName { | |
self = [super init]; | |
if(self) { | |
NSString *pathToResource = [[NSBundle mainBundle ] pathForResource: plistName ofType:@"plist"]; | |
NSMutableArray *quoteArray = [NSMutableArray arrayWithContentsOfFile:pathToResource]; | |
} | |
return self; | |
} | |
@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
... All the UIKit headers ... | |
@class MyQuiz; | |
@interface QuoteQuizViewController : UIViewController | |
@property (nonatomic, assign) NSInteger quizIndex; | |
@property (nonatomic, strong) MyQuiz * quiz; | |
@end | |
@interface MyQuiz : NSObject | |
@property (nonatomic, strong) NSMutableArray *quoteArray; | |
-(id) initWithTheQuiz : (NSString *) plistName; | |
@end | |
@interface QuoteQuizViewController () | |
@end | |
@implementation QuoteQuizViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.quizIndex = 999; | |
self.quiz = [[MyQuiz alloc] initWithTheQuiz:@"quotes"]; | |
// Do any additional setup after loading the view, typically from a nib. | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment