开发者

When do you need to create a seperate xib for your controller?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜