Slee
Slee

Reputation: 28258

can you push 2 of the same UIViewController on the UINavigation stack?

I have an app where I want unlimited categories and sub-categories and would only like a single UIViewController be used to display the categories and just keep adding instances of it to the UINavigationController - is this an allowed practice?

Upvotes: 0

Views: 145

Answers (1)

Praveen S
Praveen S

Reputation: 10393

Yes you can do that, but i wonder why you would want to push multiple instances of same Controller's view onto stack. I hope each view is different from previous. In that case your requirement should be the user can come back to previous state of the view using the navigation controls.

Upvotes: 1

Related Questions