I'm trying to display some data on the flip side view of a utility template application but the application aborts at the end of viewDidLoad method. I'm very new to iOS and could do with a bit of guidance.
[super viewDidLoad];
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
NSString *thePath = [[NSBundle mainBundle] pathForResource:@"SavedData"ofType:@"plist"];
NSMutableDictionary *tempRootDictionary;
NSMutableArray *tempMutableArray;
if (thePath && (tempRootDictionary = [NSMutableDictionary dictionaryWithContentsOfFile:thePath])) {
NSArray *keys = [tempRootDictionary allKeys];
int keysCount = [keys count];
tempMutableArray = [NSMutableArray arrayWithCapacity:keysCount];
for (int i=0; i<keysCount; i++) {
NSDictionary *dictionary = [tempRootDictionary objectForKey:[keys objectAtIndex:i]];
MyModelObject *aModelObject = [[MyModelObject alloc] init];
[aModelObject setName:[dictionary objectForKey:@"name"]];
[aModelObject setContext:[dictionary objectForKey:@"context"]];
[aModelObject setUsername:[dictionary objectForKey:@"username"]];
[aModelObject setPassword:[dictionary objectForKey:@"password"]];
[tempMutableArray addObject:aModelObject];
[aModelObject release];
[dictionary release];
}
} else {
return;
}
Help would be really appreciated, Many thanks...