iOS故事板是否应该使用它们? [英] iOS Storyboards Should I use them or not?

查看:83
本文介绍了iOS故事板是否应该使用它们?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iOS开发的新手(尚未创建任何应用程序),但是我向我的朋友寻求建议,因为我的朋友在市场上具有很高的评价.他说不要使用情节提要.

I am new to iOS development (No apps created yet), but I ask for advice from my friend that has really high rated apps on the market. He said not to use storyboards.

就我想听他的建议而言,他们似乎真的很有帮助.

As much as I want to take his advice, they seem really helpful.

  • 这是否会在将来导致我的应用出现问题?
  • 有什么理由我可能不想使用情节提要吗?

来自Android背景,我不明白为什么要使用它们.

Coming from an Android background, I don't see why I should use them.

推荐答案

我建议不要使用情节提要或Interface Builder.

I'd recommend against using either storyboards or Interface Builder.

  • 如果您花更多的时间使用Objective-C,将会更快地学习它.在IB和代码之间切换,您将需要学习两件事.上下文切换仍会在以后使您减速.
  • 小结和情节提要是大型XML文件,无法在源代码管理中很好地发挥作用.如果您与其他人同时工作,则将会发生合并冲突.
  • 您无法看到IB中同时发生的所有事情,因此很难找到诸如布局问题之类的东西.
  • 您无法像在代码中那样在IB中搜索或替换
  • 小部件和情节提要将视图逻辑置于控制器中.对您来说这是否成问题取决于您有多少MVC纯粹主义者.
  • 如果您想将应用程序移植到Android或从Android移植,IB会变得更加困难.
  • You'll learn Objective-C faster if you spend more time using it. Switching between IB and code, you'll have two things to learn. The context switching will still slow you down later on.
  • Nibs and storyboards are big XML files that don't play well with source control; if you're working on one at the same time as someone else, you will get merge conflicts.
  • You can't see everything that's going on at once in IB, so it's hard to track down things like layout problems.
  • You can't search or replace in IB the way you can in code
  • Nibs and storyboards put your view logic in your controllers. Whether that's a problem for you depends on how much of an MVC purist you are.
  • If you want to port your apps to/from Android, IB will make it much harder.

这一切都来自经验.我开始运行一个小的软件团队,使用IB开发iOS应用程序(故事板尚未发布),并且在一年之内引起了很多问题,以至于我不得不禁止使用它.当我们停止使用它时,我们的生产率得到了提高.

This all comes from experience. I started out running a small software team developing iOS apps using IB (storyboard wasn't out yet) and within a year it had caused so many problems that I'd had to forbid its use. Our productivity went way up when we stopped using it.

这篇关于iOS故事板是否应该使用它们?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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