iOS 应用程序 UI 的层次结构
我在阅读有关 CALayers、UIViews 和 View Controllers 的内容时感到困惑。有人可以解释一下它们之间的关系(并包括我可能错过的任何内容吗?)。
我对可能具有多个层的视图特别感兴趣。这是否意味着视图控制器有多个 UIView,或者 UIView 有多个 CALayer?或者,UIView 是否有另一个 UIView 子视图?
谢谢你们的帮助。
编辑:我想我应该提到我将以编程方式设置这些人,这就是为什么我需要真正理解这些关系,而不是依赖 IB 为我做所有繁重的工作。
I am getting confused reading about CALayers, UIViews and View Controllers. Can someone explain the relationship each of those have to each other (and include anything I might have missed?).
I am particularly interested in a View that may have more than one layer. Does that mean the the View Controller has multiple UIViews or that the UIView has more than one CALayer? Or, does the UIView have another UIView subview?
Thanks for the help guys.
Edit: I guess I should have mentioned I am going to be setting these guys up programmatically, which is why I need to actually understand the relationships instead of relying on IB to do all the heavy lifting for me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您读过
http://tuvix.apple .com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/LayerTreeHierarchy.html?
Have you read
http://tuvix.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/LayerTreeHierarchy.html ?