Is it possible to initialize the entire UITableViewController (or subclass) from a secondary NIB ... and not just UIView?

Almost all UINavigationController examples show the use of initWithNibName: bundle: to load a NIB containing NOT the entire UIViewController (or subclass), but only the UIView, with the NIB file owner class property set to the UIViewController (or the corresponding subclass) and its viewpoint pointed to UIView ...

Why is this? Why can't you instantiate the complete UIViewController (specifically the UITableViewController) from the secondary NIB? And why do you even need to install a power outlet in the IB? I don't understand the point of creating an empty white view that will be completely ignored by the UITableViewController anyway.

In the MainBindow NIB, you can do both things that you can't seem to do from the secondary NIB. You can customize the UINavigationController and then inside it you can customize the UITableViewController (or subclass). And you don't have to create a completely superdense UIView object - quite useful, since the whole point (I thought!) Of the UITableViewController is that it creates and manipulates the associated table view for you using its delegation methods.

What's going on here? Am I stupid? Is there any other way to do what I want? Or is there some logical reason that they are like them?

+2


source to share


1 answer


In IB, create a new "empty" thread and drag the "Table View Library" into it from the library.



Or am I not understanding the question?

+3


source







All Articles