不使用Interface Builder的iPhone应用程序 [英] iPhone app without using Interface Builder

查看:81
本文介绍了不使用Interface Builder的iPhone应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有理由在不使用界面构建器的情况下编写iphone应用程序?

Is there any reason to not write iphone apps without useing the interface builder?

(换句话说,是否可以在没有构建器的情况下编写应用程序?)

(or in other words, is it ok to write apps without the builder?)

推荐答案

就我个人而言,我的应用程序中不使用任何NIB,但这更多的是如何我开始做开发而不是其他任何事情。我从第一个测试版SDK发布时开始从Mac开发(几乎每天都使用Interface Builder)转换到iPhone。最初,没有Interface Builder,即使它出现了你也无法用它做很多事情,所以我从来没有花时间在iPhone上真正了解它。这更像是我做我熟悉的事情。

Personally, my applications use no NIBs within them, but that's more of a matter of how I started doing development than anything else. I transitioned over from doing Mac development (where I use Interface Builder almost every day) to iPhone from when the first beta SDKs were released. Initially, there was no Interface Builder, and even when it came you couldn't do a lot of things with it, so I never took the time to really get to know it on the iPhone. It's more a matter of me doing what I'm familiar with.

Jeff LaMarche在他的文章不要害怕Interface Builder 让你尽可能使用Interface Builder,我鼓励在开始编程用户界面生成之前,新开发人员要先学会使用它。使用标准元素为接口节省了大量时间。

Jeff LaMarche makes a convincing argument in his article "Don't Fear the Interface Builder" for you to use Interface Builder wherever you can, and I encourage new developers to learn to use it first before dropping down to programmatic user interface generation. It saves you a tremendous amount of time for interfaces using standard elements.

有些人认为使用纯编程接口可以获得性能优势,但是Matt Gallagher 运行了一系列基准测试和发现这种加速通常只有5-10%。如果你真的想要从你的应用程序的启动时间中减去最后一点,那么你可以在Adrian Kosmaczewski的 nib2objc ,它从您的NIB文件生成Objective-C。

Some people have argued that there is a performance benefit to be had using purely programmatic interfaces, but Matt Gallagher ran a series of benchmarks and found that this speedup is only typically on the order of 5-10%. If you really want to shave that last bit off of your application's startup time, you might be able to have the best of both worlds with Adrian Kosmaczewski's nib2objc, which generates Objective-C from your NIB files.

但是,有很多时候您需要操作接口以编程方式,例如自定义视图和动画。此代码可以与Interface Builder并行存在,而不会产生太多混淆。同样,此时更多的是个人偏好问题,但我的建议是使用Interface Builder,因为它可以节省您的时间。

However, there are plenty of times that you'll need to manipulate interfaces programmatically, such as for custom views and animations. This code can exist in parallel with Interface Builder without too much confusion. Again, it's more of a matter of personal preference at this point, but my recommendation is to use Interface Builder due to the time it can save you.

这篇关于不使用Interface Builder的iPhone应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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