So I have a question about views on iPhone. I have an app based on the Tab Bar template in XCode. One of the tab views is a TableView. In that table view, when a user selects one of the cells, I want it to load a view that shows more details about this.
Right now, I have:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
SportsAppDelegate *appDelegate = (SportsAppDelegate *)[[UIApplication sharedApplication] delegate];
// Deselect
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
//Process which one, sets an index
//Show detail
SportsGameView *detail = [[SportsGameView alloc] init];
[detail setMe:index]; //sets the index that tells it which one
[appDelegate.window insertSubview:detail.view atIndex:0];
[self.view removeFromSuperview];
[detail release];
}
Within the SportsGameView (the one I'm trying to load on top), I have setMe defined to initalize a bunch of UILabels with these.
I can confirm it gets these, but somehow, it doesn't actually show up. I suspect it has something to do with my .xib. I defined IBOutlets in SportsGameView as I normally would, and hooked them up in Interface Builder.
Anyone know why?
Sorry if this was a bit confusing.
Thanks!