我想知道是否有一种方法可以在 View Controller 中使用某些 View Controller ,该 Controller 提供与Android中的Fragment
相同的功能?
我想使用自定义 View Controller ,所以我不想使用NSTabViewController
,UISplitViewController
等。
最佳答案
Container View Controllers
允许在另一个 View Controller 中包含 subview Controller 。通过单击类概述中的“更多...”链接来查看docs。
在 Storyboard 中使用它们就像将“容器 View ”拖动到 View Controller 一样简单。
Xcode会自动向其添加一个 subview Controller