Pushing the same view controller instance more than once is not supported

I get this exception if I push a UIViewController which has the same class as one which has already been pushed on a UINavigationViewController stack. Is this a new restriction?

Is there a way around this other than inspecting the contents of UINavigationViewController.viewControllers before pushing?

MacBook, Mac OS X (10.5.6)

Posted on Dec 16, 2008 6:01 PM

Reply
10 replies

Jan 8, 2009 1:33 AM in response to Dave iMac

Hi Dave,

and how did you inspect the contents of UINavigationViewCOntroller.viewControllers?

I also get this exception. I have three ViewControllers, which get pushed on the navigation controller's stack. When I pop the third controller, I get this exception.

Funny thing is, I do NOT push the next view controller (cause it is already on the stack), i POP the last one, which normally (in iPhone OS 2.1) has the result, that the view controller, which was shown before the one I pop, will get shown again.

But in iPhone OS 2.2, when I pop that last view controller, there occurs this strange exception.

Anyone any ideas? 🙂

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Pushing the same view controller instance more than once is not supported

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.