Do you need to create a seperate xib for a table view controller?
For example I have a table view controller that I'm creating in xcode, file new (.h and .m) will I need to create a xib for it as well? I'm setting my table view controlle开发者_如何学Cr as the root view controller for a navigation controller.
Basically I'm not sure if you always need a controller + view + xib for every view you have or the xib is optional if you don't need to drag subviews to it in IB.
The XIB is optional for any UIViewController
- it just provides a convenient way to setup your view hierarchy visually, rather than in code. If you don't use a XIB, use -[UIViewController loadView]
to setup your UIViewController
's .view
property.
精彩评论