George Penn.
George Penn.

Reputation: 413

iPhone pushViewController different instances of the same class

my problem is the following: I have a NavigationController that contains the whole app and I want to push two instances of the same UIViewController subclass, however when I call pushViewController, nothing happens. Is this behavior supported or? I use a class, that takes its arguments with the -init method and populates a UITableView programmatically based on this info.

The reason I want two instances of the same class is that I need the back button to work as expected.

The class is basically a custom UITableView that loads its content after performing an XPath query through an XML.

I will provide more information if requested.

Upvotes: 0

Views: 599

Answers (1)

Hot Licks
Hot Licks

Reputation: 47739

There should be nothing special about pushing two distinct instances of the same VC, so long as they are, in fact, distinct instances with no UI-related objects shared between them. (Obviously, sharing data sources, etc, is not a problem.)

Upvotes: 3

Related Questions