ViewController Class
Content Class
Generator Class
Code:
- (void)viewDidLoad
{
[super viewDidLoad];
NSMutableDictionary *content = [NSMutableDictionary dictionaryWithCapacity:1];
Generator *temp = [[Generator alloc] init];
[temp generateContent:content];
}
Content Class
Code:
#import "Content.h"
@implementation Content
@synthesize QuestionName = _QuestionName;
@synthesize Question = _Question;
@end
Generator Class
Code:
- (NSMutableDictionary *) generateContent: (NSMutableDictionary *) content
{
content = [NSMutableDictionary dictionaryWithCapacity:1];
Content *first = [[Content alloc] init];
first.QuestionName = @"Scenario 1";
first.Question = @"This 57 year old cook worker presented to the out of hours GP service having splashed a oven cleaner in his left eye. His work colleagues irrigated his eye in the sink and have driven him promptly to see you. After instillation of proxymetacaine his visual acuity was 6/9. \nShould you...";
[content setObject:first forKey:first];
Content *second = [[Content alloc] init];
second.QuestionName = @"Scenario 2";
second.Question = @"A 19 year old lady presented to her GP with a one week history of redness, mild discomfort, watering and blurred vision in her right eye. The patient has a history of cold sores around her mouth and states that her ophthalmologist has given her steroid drops in the past. Instillation of flourescein gives the above lesion. \nWhich is the correct treatment?";
[content setObject:second forKey:second];
return content;