我应该使用界面构建器吗? [英] Should I use interface builder or not?

查看:68
本文介绍了我应该使用界面构建器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更多地了解在开发iPhone / iPad应用程序时使用界面构建器的优缺点。

I'd like to know more about the pros and cons of using interface builder when developing iPhone/iPad apps.

我写了一个相当复杂和定制的app现在在应用程序商店中,但所有界面都是手工编码的,因为它们相当复杂。我已经定制了带有背景的导航和标签栏,手动绘制了表格视图单元格以提高速度,而且有些视图很复杂且可扩展且包含许多子视图。

I've written a fairly complex and customized app that's on the app store right now, but all of the interfaces are hand coded as they are fairly complex. I've customised the navigation and tab bars with backgrounds, table view cells are manually drawn for speed, and some views are complex and scalable with many subviews.

我是思考是否开始使用界面构建器,但我不确定我将在多大程度上使用它以及它是否值得。它更快吗?事情还可以轻松定制吗?

I'm pondering whether or not to start using interface builder but I'm not sure to what extent I'll use it and whether it's worth it at all. Is it quicker? Can things still be easily customised?

欢迎任何建议!

推荐答案

绝对没有理由不使用它。令人害怕的一件事是他们使用其他GUI工具的经验,为他们生成代码的事情或其他一些混乱。然后问题就是很难对界面进行往返,一旦生成它们就无法轻易修改,因为将这些更改推回到发出的代码中的复杂性。

There is absolutely no reason not to use it. One thing that scares people off is their experiences with other GUI tools, things that generated code for them or some other mess. Then the problem becomes that it is hard to round-trip the interface, you cannot easily modify things once they are generated because of the complexity of pushing those changes back into the emitted code.

Interface Builder不生成代码,它使用NSArchiver来读取和写入GUI的实际对象图。这有很多好处,首先是您可以轻松地对界面进行往返并进行增量更改。这真的很好,使用它。 : - )

Interface Builder does not generate code, it uses NSArchiver to read and write an actual object graph for the GUI. This has many benefits, starting with the fact that you can easily round-trip the interface and make incremental changes. It really is all good, use it. :-)

这篇关于我应该使用界面构建器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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