I'm working on an app that when you select a row in a table view it opens up another view (Called BiosDetailController, that loads a html page) that shows some information about a particular member of a band that I know. What happens is that when the row in the table view is selected it shows a blank WebView instead of the html page that I specified.
My Code looks like this:
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
BiosDetailController *bioDetailController =
[[BiosDetailController alloc] initWithNibName:@"BiosDetailController" bundle:nil];
bioDetailController.detailURL= [[NSURL alloc] initWithString:
[[[memberData objectAtIndex:indexPath.section] objectAtIndex: indexPath.row] objectForKey:@"url"]];
bioDetailController.title=
[[[memberData objectAtIndex:indexPath.section] objectAtIndex:indexPath.row] objectForKey:@"name"];
[self.navigationController pushViewController:bioDetailController animated:YES];
[bioDetailController release];
}
/* Creates the information and put it in the memberData Array */
- (void)createMemberData {
NSMutableArray *members;
memberSections = [[NSMutableArray alloc] initWithObjects:@" ", nil];
members = [[NSMutableArray alloc] init];
[members addObject:[[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"Ali", @"name", @"ali.png", @"picture",
@"http://bios.scarletfade.com/ali.html",@"url", nil]];
[members addObject:[[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"Jordan", @"name", @"Jordan.png", @"picture",
@"http://bios.scarletfade.com/jordan.html",@"url", nil]];
[members addObject:[[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"Jaimee", @"name", @"Jaimee.png", @"picture",
@"http://bios.scarletfade.com/Jaimee.html",@"url", nil]];
[members addObject:[[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"Jake", @"name", @"Jake.png", @"picture",
@"http://bios.scarletfade.com/Jake.html",@"url", nil]];
memberData = [[NSMutableArray alloc] initWithObjects:members, nil];
[members release];
}
Is there something in these two methods that I am not implementing properly? Or am I just missing a step?
Any help would be appreciated.