[英]How to connect UIViewController to UIView using storyboard segue, without any code?
I am searching about some audio tutorial over internet and I eventually found a demo/example from apple. 我正在通过互联网搜索一些音频教程,最终从苹果找到了一个演示/示例。 In this example I am wondering how they connect UIViewController to a UIView using storyboard segues.
在此示例中,我想知道它们如何使用情节提要脚本将UIViewController连接到UIView。
Download project from here. 从这里下载项目。
Below is storyboard connections
以下是情节提要连接
When we run app below is it's output
当我们在下面运行应用程序时,它的输出是
Can any one explain how to achieve this. 谁能解释一下如何实现这一目标。
They are using container views to include child controllers defined somewhere else. 他们正在使用容器视图来包含在其他地方定义的子控制器。
Its actually still a connection between 2 controllers. 它实际上仍然是2个控制器之间的连接。 There is no independent view.
没有独立的观点。
To create a parent-child container relationship at design time, add a container view object to your storyboard scene, as shown in Figure 5-3.
要在设计时创建父子容器关系,请将一个容器视图对象添加到情节提要场景中,如图5-3所示。 A container view object is a placeholder object that represents the contents of a child view controller.
容器视图对象是一个占位符对象,代表子视图控制器的内容。 Use that view to size and position the child's root view in relation to the other views in the container...
使用该视图可以将子级根视图的大小和位置相对于容器中的其他视图...
See Implementing a Container View Controller in the Apple docs, chapter Configuring a Container in Interface Builder. 请参阅Apple文档中的“ 实现容器视图控制器 ”一章,在Interface Builder中配置容器。
Here container view is using.
这里正在使用容器视图。 Container view controllers are a way to combine the content from multiple view controllers into a single user interface.
容器视图控制器是一种将来自多个视图控制器的内容组合到单个用户界面中的方法。 Container view controllers are most often used to facilitate navigation and to create new user interface types based on existing content.
容器视图控制器最常用于促进导航并基于现有内容创建新的用户界面类型。 please view this link for detail
请查看此链接以获取详细信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.