Reputation: 8106
I have a view controller (HomeViewController
) and push another view controller (UserProfileViewController
) in my UserProfileViewController
, I want to push another instance of UserProfileViewController
. How can I do that when I'm in UserProfileViewController
?
Thanks!
Upvotes: 0
Views: 876
Reputation: 866
You can just create a new instance of that view controller and push it. like:
UserProfileViewController *x = [[UserProfileViewController alloc] init];
[yourNavController pushViewController x];
[x release];
This new view controller will have a different address in memory, and will be entirely different from the current view controller.
Upvotes: 2