如果你想在子视图中显示一些 UIViews 作为内容,你可以为 UIViews 创建类并为它们添加一个 XIB。然后这些 UIView 可以显示在 UIViewController 的子视图中。但是使用情节提要,如何为 UIView 设置一个界面以用作子视图,而不是在 UIViewController 中制作它?
问问题
691 次
1 回答
2
The short answer is, you don't. If your views are completely re-usable and can be fully de-coupled from any View Controller, feel free to continue using .xib files for these.
Storyboards are intended to architect and document the UI at the level of "hierarchies of views", each hierarchy is managed by a view controller. Xib files are still be right place to construct (graphically) "satellite" views which do not belong to a particular view hierarchy.
于 2012-08-25T23:45:04.557 回答