node ninja
node ninja

Reputation: 32986

presentModalViewController vs. pushViewController

I can show a different view with this code:

[self presentModalViewController:childView animated:nil];

This code should do the same thing, right?

[self.navigationController pushViewController:childView animated:YES];

But it doesn't do anything. Why is that?

Upvotes: 1

Views: 1360

Answers (1)

ssj
ssj

Reputation: 881

pushViewController only works in navigation controllers

presentModalViewController works for all view controllers

Upvotes: 5

Related Questions