IT English Collection(19)of View object

1 前言

本章主要介绍了View视图对象,包括了其属性,视图间关系和CALayer的简介。

2 详述

2.1 原文

A view is an object that draws itself within arectangular area of a window and that can respond to user actions such as finger taps or mouse clicks. A view draws a visualrepresentation of itself and presents a surface that responds to touches and input from devices. Not all views handle events, but views are more likely to handle events than other types of responder objects (that is, objectscapable of responding to events). Views also provide the content for printing. For a view to be useful, it must besituated in the view hierarchy of a window.
Views inherit, directly or indirectly, from NSView in Mac OSX or from UIView in iOS. These classes perform no drawing or event-handling themselves, but provide the interface andinfrastructure for subclasses. The AppKit and UIKit frameworks provide almost all views that you see in an application’s window, including buttons, table views, text fields, toolbars, and sliders. These views are available to your project in the Interface Builder library. You can also subclass UIView or NSView and create custom views that draw themselves and handle events indistinctive ways.


The Core Properties of Views


Views in both the UIKit and AppKit frameworks have important characteristics defined by a handful of properties:
·View boundary and placement. The frame and bounds of a view define its boundaries and its relationships to other views. The framespecifies the placement and size of a view within its superview’s coordinate system; the bounds of a view specifies the local coordinate system that a view uses for drawing itself. (Views in UIKit also have a property that locates the center of their rectangular area.)
·Relationship to other views. The superview, subview, and window properties specify a view’s place in the view hierarchy of its window. You add views (subviews) toenclosing views (superviews) to create compound views and, ultimately, to create a user interface. An autoresizing property specifies how a view’s subviews position and resize themselves when the enclosing view itself is resized.


Views Are Inherently Capable of Animation


In both iOS and OS X, each view is (or can be)backed by a Core Animation layer object (CALayer), which isaccessible through the layer property. The layer object caches a view’s drawing content,assists in the layout and rendering of that content, and can composite and animate that content. Certain properties of a view, such as the view’s frame and itsopacity, are implicitly capable of animation.In addition, an application may explicitly animate a view using facilities of the Core Animation framework.
In OS X, CALayer-support is optional whereas in iOS this support is built into each view’s rendering implementation.

2.2 生词

rectangular[rek'tæŋgjʊlə] adj. 矩形的;成直角的

representation[,reprɪzen'teɪʃ(ə)n]n. 代表;表现

presents[ˈpreznts]v. 显示(present的单三形式);出席

surface['sɜːfɪs]n. 表面;表层;外观

capable['keɪpəb(ə)l]adj. 能干的,能胜任的;

situated['sɪtjʊeɪtɪd]adj. 位于…的;处于…境遇的

inherit[ɪn'herɪt]vt. 继承;遗传而得

infrastructure['ɪnfrəstrʌktʃə]n. 基础设施;

distinctive[dɪ'stɪŋ(k)tɪv]adj. 有特色的,与众不同的

boundary['baʊnd(ə)rɪ]n. 边界;范围;

placement['pleɪsmənt]n. 布置;定位球;人员配置

specifies[spesifais]n. 指定

enclosingv.封闭;围合

compound['kɒmpaʊnd]vt. 合成;混合;

ultimately['ʌltɪmətlɪ]adv. 最后;根本;基本上

backed by依靠;在…支持/掩护/配合下

accessible[ək'sesɪb(ə)l]adj. 易接近的;可进入的;可理解的

assists[ə'sists]v. 帮助;促进(assist的三单形式)

rendering['rend(ə)rɪŋ]n. 翻译;表现;表演;描写;打底;(建筑物等)透视图

composite['kɒmpəzɪt]vt. 使合成;使混合

animate['ænɪmeɪt]vt. 使有生气;使活泼;鼓舞;推动

opacity[ə(ʊ)'pæsɪtɪ]n. 不透明;不传导

implicitly[ɪm'plɪsɪtlɪ]adv. 含蓄地;暗中地

in addition另外,此外

explicitly[ik'splisitli]adv. 明确地;明白地

facilities[fə'sɪlɪtɪz]n. 设施;工具,设备

3 结语

    以上是所有内容,希望对大家有所帮助。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值