简体   繁体   English

比较UIWindow和UIView

[英]Comparing UIWindow and UIView

What are the differences between a UIWindow and a UIView in Objective-C? Objective-C中的UIWindowUIView有什么区别?

How does the view hierarchy work? 视图层次结构如何工作? I know that you can add a UIView to a UIWindow , with something like: 我知道您可以将UIView添加到UIWindow ,例如:

[self.window addSubview:secondView];

Are you able to add a Subview to another UIView ? 您可以将Subview添加到另一个UIView吗?

The difference between UIWindow and UIView. UIWindow和UIView之间的区别

In iOS, you use windows and views to present your application's content on the screen.Windows do not have any visible content themselves but provide a basic container for your application's views. 在iOS中,您使用窗口和视图在屏幕上显示应用程序的内容.Windows本身没有任何可见的内容,但为应用程序的视图提供了基本的容器。 Views define a portion of a window that you want to fill with some content. 视图定义要填充某些内容的窗口的一部分。 For example, you might have views that display images, text, shapes, or some combination thereof. 例如,您可能具有显示图像,文本,形状或其某种组合的视图。 You can also use views to organize and manage other views. 您还可以使用视图来组织和管理其他视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM