Possible Duplicate:
whose view is not in the window hierarchy
I have a problem with my code.
I want to go to another view controller, so here is my code:
- (void)reloadMyTB {
TestViewController *vc = [[TestViewController alloc] init];
UINavigationController *cntrol = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentModalViewController:cntrol animated:NO];
[cntrol release];
}
But it does'nt work and I can read the following line in the log:
Warning: Attempt to present <UINavigationController: 0x133db4b0> on <ArticleViewController: 0x13828330> whose view is not in the window hierarchy!
Thanks!