Right... This one's had me scratching my head for some time. Does anyone know if it's possible to load a video from a table view. Currently, I'm using this set up to load a new view from each cell...
Code:
- (UITableViewCell *)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NoSamples *noSamplesView = [[NoSamples alloc] initWithNibName:@"NoSamples" bundle:nil];
NoTamborim *noTamborimView = [[NoTamborim alloc] initWithNibName:@"NoTamborim" bundle:nil];
Maintenance *MaintenanceView = [[Maintenance alloc] initWithNibName:@"Maintenance" bundle:nil];
switch (indexPath.row)
{
case 0:
[self.navigationController pushViewController:noSamplesView animated:YES];
break;
case 1:
[self.navigationController pushViewController:noTamborimView animated:YES];
break;
default:
[self.navigationController pushViewController:MaintenanceView animated:YES];
break;
}
}
I'd just like to know whether I can use the 'switch (indexpath.row)' function to load a video rather than a new view.
I've previously tried loading the new view then using the video code under 'viewDidLoad' but didn't have much luck. I could hear the video playing but only the navigation controller was visible with a white background.
Any help would be appreciated.
Cheers