Duplicating views

cocoa, objective-c

Solution

Dave DeLong is close and somewhat your question contains the answer ("each tab must has an instance of the view"). Create a UIViewController subclass to programatically create the view, or to load a NIB. Then instantiate several instances of your UIViewController subclass and add them all to the UITabViewController's viewControllers property.

You'll want to spend some time with the View Controller Programming Guide. The fact that you are making multiple instances of the same UIViewController subclass really has little impact on the solution.

Problem

I want to create a view with some controls inside, a text field and some buttons, and I want to duplicate this to show them as content of a tab in a tabview. Each tab must has an instance of this view. Directions?

Original source