本文主要是介绍IT English Collection(24)of View hierarchy,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 前言
本节主要介绍了层级视图,以及UIWindow,父视图和子视图之间的关系。
转载请注明转自:http://blog.csdn.net/developer_zhang
2 详述
2.1 原文
A view hierarchy defines the relationships of views in a window to each other. You can think of a view hierarchy as aninverted tree structure with the window being the top node of the tree. Under it come viewsstructurally specified by parent-child relationships. From a visualperspective, the essential fact of a view hierarchy isenclosure: one view contains one or more other views, and the window contains them all.
The view hierarchy is a major part of the responder chain, and it is something that the application frameworks use todetermine the layering order of views when theyrender the content of a window in a drawing pass. The view hierarchy is also the governing concept behind viewcomposition: You constructcompound views by adding subviews to a superview. Finally, the view hierarchy is acritical factor in the multiple coordinate systems found in a window.
Three View Properties Define Relationships in the Hierarchy
A view is related to other views through two properties, and these relationships determine the form of the hierarchy:
(1)superview — The view above a given view in the hierarchy; this is the view thatencloses it.
All views except the topmost view must have a superview.
(2)subviews — The views below a given view in the hierarchy; these are the views that it encloses.
A view may have any number of subviews, or it may have none.
Views also include another property that identifies their window.
In iOS, a Window is a View
In OS X a window has a single “content view,” a background view from which, structurally, all other views in the hierarchydescend. However, in iOS applications, a window is a view (UIWindow inherits from UIView), and so it acts as its own content view.
2.2 生词
hierarchy ['haɪərɑːkɪ]n. 层级;等级制度
inverted [ɪn'vɜːtɪd]adj. 倒转的,反向的
structurally ['strʌktʃərəli]adv. 在结构上
specified ['spesifaid]adj. 规定的;详细说明的
perspective [pə'spektɪv]n. 观点;远景;透视图
essential [ɪ'senʃ(ə)l]adj. 基本的;必要的
enclosure [ɪn'kləʊʒə; en-]n. 附件;围墙;围场
determine [dɪ'tɜːmɪn]vt. 决定;判决;
render ['rendə]vt. 致使;提出;实施
pass [pɑːs]n. 及格;经过;护照;途径;传球
governing ['ɡʌvənɪŋ]adj. 有统治、控制或治理权力的
concept ['kɒnsept]n. 观念,概念
composition [kɒmpə'zɪʃ(ə)n]n. 作文,作曲,作品;[材] 构成;合成物;成分
construct [kən'strʌkt]vt. 建造,构造;创立
compound ['kɒmpaʊnd]vt. 合成;混合;和解妥协;搀合
critical ['krɪtɪk(ə)l]adj. 鉴定的;[核] 临界的;批评的
factor ['fæktə]n. 因素;要素;[物] 因数;代理人
encloses [ɪn'kləʊz; en-]vt. 围绕;装入;放入封套
descend [dɪ'send]vi. 下降;下去;下来;遗传;屈尊
inherit [ɪn'herɪt]t. 继承;遗传而得
3 结语
以上是所有内容,希望对大家有所帮助。
这篇关于IT English Collection(24)of View hierarchy的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!