Interchanging presentModalViewController and pushViewController
Posted
by Neffster
on Stack Overflow
See other posts from Stack Overflow
or by Neffster
Published on 2010-04-03T01:23:14Z
Indexed on
2010/04/03
1:33 UTC
Read the original article
Hit count: 476
I am using a sample ViewController that is displayed in the sample program as a presentModalViewController. However, I want to use pushViewController on the UIViewController instead. The problem is that when I switch to pushViewController, the ViewController no displays properly. Functions in the ViewController are called, but I don't see anything. I change back to presentModalViewController and everything works.
The question is what do I need to do to make pushViewController work?
FCVC *fcVC;
NSArray *array = [[NSBundle mainBundle] loadNibNamed:@"fcVC" owner:self options:nil];
fcVC = [array objectAtIndex:0];
A. [self presentModalViewController:fcVC animated:YES]; // "WORKS"
or
B. [self.navigationController pushViewController:fcVC animated:YES]; // "Doesn't work
© Stack Overflow or respective owner