views:

302

answers:

1

I know that the View XIB has a view already in place, but are there any other differences? I've read tutorials which say to create a View XIB, change the class and delete the view, then insert a Table View and remake the connections (File's Owner to the Table View, Table View delegate and datasource back to the File's Owner). Is there any difference in the end result if I follow these steps:

  • Make an Empty XIB
  • Change the File's Owner class to one of my custom classes
  • Add a Table View
  • Connect the File's Owner to the Table View as its view
  • Connect the delegate and datasource from the Table View to the File's Owner
+5  A: 

No, there is no appreciable difference between an View XIB and an Empty XIB with a Custom View dragged in.

There are no connections in a View XIB initially, so no connections to "remake".

What you describe will work fine, there is no difference between that and creating a View XIB, deleteing the view and continuing from step 2.

You can actually open the .xib files in BBEdit and compare them to see the trivial differences between the XML.

Peter N Lewis
Thanks, just what I was looking for.The remaking connections I was talking about was just the File's Owner to its view connection, I made a mistake including the delegate ones.Great idea to look at them in BBEdit. NIB files often seem a bit like voodoo, that's a good way to demystify them.
nevan