开发者

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

开发者 https://www.devze.com 2023-03-07 05:27 出处:网络
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 w

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

精彩评论

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