故事板xib / nib纯编程之间的最佳实践 [英] Best pratice between storyboard xib/nib pure programming
问题描述
成为ios编程的新手,我当然开始使用故事板,然后我读到当多个开发人员在同一个应用程序上工作时它有其局限性,所以我切换到纯代码。但我猜xib / nib可能是一个很好的妥协。
你能给我一个更成熟的观点吗?
非常感谢你的灯光
Being new to ios programming,
I started of course with storyboard then I have read that it has its limitation when multiple developer comes to work on the same app, so I switched to pure code. But I guess xib / nib might be a good compromise.
Can you give me a more mature point of view?
Thanks a lot for your lights
推荐答案
我投票反对使用故事板。它们就像通常的eyecandy东西一样,在WWDC演示中看起来很漂亮,但在现实场景中它很少做正确的事情......故事板迫使你做出不幸的架构决策(参见:http://doing-it-wrong.mikeweller.com/2013/ 06 / ios-app-architecture-and-tdd-1.html ),当你的项目继续进行时,故事板很快演变成一个混乱的视图控制器和segues,更不用说合并故事板的问题了。 。 去过也做过。用vim。这很痛苦......
I'd vote against using storyboards. They're just like the usual eyecandy stuff, that looks pretty with toy examples in WWDC presentations, but in real-life scenarios it rarely does the right thing... Storyboards force you to make unfortunate architectural decisions ( see: http://doing-it-wrong.mikeweller.com/2013/06/ios-app-architecture-and-tdd-1.html ), and as your project goes on, storyboards quickly evolve into a horrible mess of viewcontrollers and segues, not to mention the problems with merging storyboards... Been there, done that. With vim. It was painful...
事实上,我已经开展了一个为期6个月的项目,开始使用故事板,现在开发到了这一点如果不是纯粹的代码,我会考虑(如果截止日期不会接近)将整个内容分成单独的XIB。
In fact, I've been working on a project for 6 months, which started out using storyboards, and now development came to a point where I'd consider (if the deadline wouldn't be close) splitting the whole stuff into individual XIB's, if not pure code.
你应该只在以下情况下使用故事板:
You should only use storyboards if:
- 你在做证明 - 概念应用程序/原型
- 您计划使用不超过6个viewcontrollers
- 您将使用简单的基于堆栈的导航而无需任何操作复杂
这篇关于故事板xib / nib纯编程之间的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!