简体   繁体   English

iOS 7过渡-XCode 5-界面生成器-Three20

[英]iOS 7 Transition - XCode 5 - Interface Builder - Three20

I've currently an App (with a lot of View Controllers, ...) what uses the "discontinued" Facebook three20 Library and any storyboard, xib file. 我目前有一个应用程序(带有许多View Controller,...),该应用程序使用“已停产”的Facebook three20库和任何情节提要,xib文件。

Now I need to update this App, the Deployment Target will be iOS 7 and I have to build it with XCode 5. 现在,我需要更新此应用程序,部署目标将是iOS 7,并且必须使用XCode 5进行构建。

So my questions: 所以我的问题是:

  • Is using the Storyboard a good Idea? 使用情节提要是一个好主意吗? Would you suggest me to recreate all View Controllers in the Interface Builder? 您是否建议我在Interface Builder中重新创建所有View Controller?

-- -

Another question: when adding a Label Programmatically using iOS 7 feature 另一个问题:使用iOS 7功能以编程方式添加标签时

self.edgesForExtendedLayout = UIRectEdgeAll;

how do I set the Frame for this Element? 如何为该元素设置框架? Need I determine if I am in Landscape, Portrait and Add the 20+44 for example manually to the y-Axis to start under the NavBar or are there better ways to solve this problem? 我是否需要确定我是否处于风景,人像并将20 + 44例如手动添加到y轴以在NavBar下启动,或者是否有更好的方法来解决此问题?

Storyboards are good, and you should absolutely use them in any future app you make. 故事板非常好,您绝对应该在以后制作的任何应用中使用它们。 Whether or not you should rebuild a current app to use storyboards is a question of how big the app currently is, how much bigger it might get, how much longer you'll support it, etc. 您是否应该重建当前的应用程序以使用情节提要是一个问题,涉及到该应用程序当前的大小,可能增加的大小,支持的时间等。

If the app is already pretty massive and it won't necessarily grow much at all from here, it's probably not worth the effort to convert over to storyboards. 如果该应用程序已经非常庞大,并且不一定从此处开始增长很多,那么将其转换为情节提要可能不值得。

If the app is only a handful of view controllers, but you have big future plans for it, I'd take the time to convert it over to storyboards so that all the future development will go faster/easier. 如果该应用程序只有少数几个视图控制器,但您对它有很大的未来计划,那么我会花时间将其转换为情节提要,以便将来的所有开发工作变得更快/更轻松。

I don't deny storyboards but I respect the custom view approach. 我不否认情节提要,但我尊重自定义视图方法。 It means I am creating my each & every component programmatically via code, be it a UILabel or a UITableView. 这意味着我将通过代码以编程方式创建每个组件,无论是UILabel还是UITableView。 Aligning code with ios7 specific requirements can also be handelled & controlled at granular level using custom View approach. 还可以使用自定义的View方法来对符合ios7特定要求的代码进行细化处理和控制。

To your questions about setting frames for the element or detecting device orientation can very well be detected & adopted by writing code. 对于您有关设置元素框架或检测设备方向的问题,可以很好地通过编写代码来检测和采用。

You can search more help as the information is available all around on programming aspects of iOS. 您可以搜索更多帮助,因为有关iOS编程方面的信息均可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM