许多教程描述了在Storyboard中添加多个子视图控制器的方法,为什么它们不只是添加多个容器视图? [英] Many tutorials describe methods for adding multiple child view controllers in the Storyboard, why don't they just add multiple container views?

查看:156
本文介绍了许多教程描述了在Storyboard中添加多个子视图控制器的方法,为什么它们不只是添加多个容器视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多教程,如此如何通过故事板添加多个子视图控制器。但本教程只是增加了故事板中的多个容器视图。

Many tutorials, such as this one go over how to add multiple child view controllers via the Storyboard. But this tutorial just adds multiple container views in the Storyboard.

为什么第一个教程(以及许多其他人)通过这样的环节来创建多个子视图控制器,如果他们只能使用多个视图容器?这是一个新功能,还是我只是误解了发生了什么?

Why is the first tutorial (and many others) going through such hoops to create multiple child view controllers if they could just use multiple view containers? Is this a new feature, or am I just misunderstanding what's going on?

推荐答案

正如另一张海报所说,容器视图和嵌入在iOS 6中添加了segues。在iOS 5中添加子视图控制器的工作量更大,因为这些选项不可用。

As the other poster said, container views and embed segues were added in iOS 6. In iOS 5 adding child view controllers was more work since these options were not available.

容器视图和嵌入段仅适用于故事板。一些开发人员不喜欢也不使用故事板。在这种情况下,你必须自己设置你的子视图控制器。

Container views and embed segues only work with storyboards. Some developers don't like and don't use storyboards. In that case you would have to set up your child view controllers yourself.

我认为容器视图和嵌入segue非常棒,并且使设置更容易。一定要使用它们。他们为你做大部分/全部的家务。

I think container views and embed segues are wonderful, and make setting things up much easier. By all means use them. They do most/all of the housekeeping for you.

这篇关于许多教程描述了在Storyboard中添加多个子视图控制器的方法,为什么它们不只是添加多个容器视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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