故事板消除了对.nib的需要 [英] Does storyboard eliminate the need for .nib

查看:99
本文介绍了故事板消除了对.nib的需要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着storyboard的介绍,我不会选择创建一个.xib / .nib当我创建一个UIViewController的子类,因为我可以在界面构建器中拖出一个viewcontroller并将其分配给新的类。 / p>

所以,用storyboard,我什么时候需要使用.xib / .nib文件?



$ p

解决方案

我想,storyboard包含所有视图的.xib / .nib文件。它提出了他们之间的关系,并帮助你避免混乱,如果你有大量的意见。此外,它还可以节省您编写代码时的时间和精力。


With the introduction of storyboard, I wouldn't select to create a .xib/.nib when I create a subclass of UIViewController, because I can just drag out a viewcontroller in interface builder and assign it to the new class.

So, with storyboard, when would i need to use the .xib/.nib file?

Thank you.

解决方案

I guess, storyboard contains the .xib/.nib files for all your views. It present relationships between them and helps you to avoid confusion if you have a LOT of views. Also it saves your time and nerves when writing code.

这篇关于故事板消除了对.nib的需要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆