Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Forked from pbrewczynski/MyQuiz.h
Last active December 21, 2015 06:19
Show Gist options
  • Save beelsebob/6263814 to your computer and use it in GitHub Desktop.
Save beelsebob/6263814 to your computer and use it in GitHub Desktop.
... 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
... 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