You should never call -viewDidLoad directly. What you want to do is present you detailViewController
somehow.
If you're inside a UINavigationController
, something like:
[self.navigationController pushViewController:detailVC animated:YES];
should work. If you're not, then you have to think about how you're going to present your view controller.
You can try something like:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath sender:(id)sender{
detailViewController *detailVC = [[detailViewController alloc] init];
detailVC.ws = [self.tabAssociation objectAtIndex:indexPath.row];
[self presentViewController: detailVC animated:YES completion:nil];
}