Overview
Layers 通常被用于去提供views的后备存储. A layer’s 的主要工作是管理您提供的视觉内容,但layer’s本身视觉属性可以设置,如背景颜色,边境,和阴影。除了管理视觉内容,该层还维护其内容的几何信息(比如它的位置、大小和变换),用于在屏幕上显示这些内容。修改layer的属性决定着你怎么样在layer几何内容上启动动画。对象封装一层一层的持续时间和节奏及其动画采用CAMediaTiming协议,它定义了层的计时信息。
如果这个layer是由View所创建的,那么这个 View将会自动成为 layer的委托对象,你不应该改变这种关系。因为层自己创建了自己,层你可以指定一个委托对象,并使用该对象提供 layer的动态内容 和执行其他任务。 layer 也有一个布局管理器对象(分配给layoutManager属性)来分别管理子视图的布局。
Symbols
Creating a Layer
Creates and returns an instance of the layer object.
Returns an initialized CALayer
object.
Override to copy or initialize custom fields of the specified layer.
Accessing Related Layer Objects
Returns a copy of the presentation layer object that represents the state of the layer as it currently appears onscreen.
Returns the model layer object associated with the receiver, if any.
Accessing the Delegate
The layer’s delegate object.
Providing the Layer’s Content
An object that provides the contents of the layer. Animatable.
The rectangle, in the unit coordinate space, that defines the portion of the layer’s contents that should be used. Animatable.
The rectangle that defines how the layer contents are scaled if the layer’s contents are resized. Animatable.
Reloads the content of this layer.
Draws the layer’s content using the specified graphics context.
Modifying the Layer’s Appearance
A constant that specifies how the layer’s contents are positioned or scaled within its bounds.
The opacity of the receiver. Animatable.
A Boolean indicating whether the layer is displayed. Animatable.
A Boolean indicating whether sublayers are clipped to the layer’s bounds. Animatable.
An optional layer whose alpha channel is used to mask the layer’s content.
A Boolean indicating whether the layer displays its content when facing away from the viewer. Animatable.
The radius to use when drawing rounded corners for the layer’s background. Animatable.
The width of the layer’s border. Animatable.
The color of the layer’s border. Animatable.
The background color of the receiver. Animatable.
The opacity of the layer’s shadow. Animatable.
The blur radius (in points) used to render the layer’s shadow. Animatable.
The offset (in points) of the layer’s shadow. Animatable.
The color of the layer’s shadow. Animatable.
The shape of the layer’s shadow. Animatable.
An optional dictionary used to store property values that aren’t explicitly defined by the layer.
A Boolean indicating whether the layer is allowed to perform edge antialiasing.
A Boolean indicating whether the layer is allowed to composite itself as a group separate from its parent.
Accessing the Layer’s Filters
An array of Core Image filters to apply to the contents of the layer and its sublayers. Animatable.
A CoreImage filter used to composite the layer and the content behind it. Animatable.
An array of Core Image filters to apply to the content immediately behind the layer. Animatable.
The filter used when reducing the size of the content.
The bias factor used by the minification filter to determine the levels of detail.
The filter used when increasing the size of the content.
Configuring the Layer’s Rendering Behavior
A Boolean value indicating whether the layer contains completely opaque content.
A bitmask defining how the edges of the receiver are rasterized.
Returns a Boolean indicating whether the layer content is implicitly flipped when rendered.
A Boolean that indicates whether the geometry of the layer and its sublayers is flipped vertically.
A Boolean indicating whether drawing commands are deferred and processed asynchronously in a background thread.
A Boolean that indicates whether the layer is rendered as a bitmap before compositing. Animatable
The scale at which to rasterize content, relative to the coordinate space of the layer. Animatable
A hint for the desired storage format of the layer contents.
Renders the layer and its sublayers into the specified context.
Modifying the Layer Geometry
The layer’s frame rectangle.
The layer’s bounds rectangle. Animatable.
The layer’s position in its superlayer’s coordinate space. Animatable.
The layer’s position on the z axis. Animatable.
The anchor point for the layer’s position along the z axis. Animatable.
Defines the anchor point of the layer’s bounds rectangle. Animatable.
The scale factor applied to the layer.
Managing the Layer’s Transform
The transform applied to the layer’s contents. Animatable.
Specifies the transform to apply to sublayers when rendering. Animatable.
Returns an affine version of the layer’s transform.
Sets the layer’s transform to the specified affine transform.
Managing the Layer Hierarchy
An array containing the layer’s sublayers.
The superlayer of the layer.
Appends the layer to the layer’s list of sublayers.
Detaches the layer from its parent layer.
Inserts the specified layer into the receiver’s list of sublayers at the specified index.
Inserts the specified sublayer below a different sublayer that already belongs to the receiver.
Inserts the specified sublayer above a different sublayer that already belongs to the receiver.
Replaces the specified sublayer with a different layer object.
Updating Layer Display
Marks the layer’s contents as needing to be updated.
Marks the region within the specified rectangle as needing to be updated.
A Boolean indicating whether the layer contents must be updated when its bounds rectangle changes.
Initiates the update process for a layer if it is currently marked as needing an update.
Returns a Boolean indicating whether the layer has been marked as needing an update.
Returns a Boolean indicating whether changes to the specified key require the layer to be redisplayed.
Layer Animations
Add the specified animation object to the layer’s render tree.
Returns the animation object with the specified identifier.
Remove all animations attached to the layer.
Remove the animation object with the specified key.
Returns an array of strings that identify the animations currently attached to the layer.
Managing Layer Resizing and Layout
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数前端工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:前端)

最后
技术是没有终点的,也是学不完的,最重要的是活着、不秃。零基础入门的时候看书还是看视频,我觉得成年人,何必做选择题呢,两个都要。喜欢看书就看书,喜欢看视频就看视频。最重要的是在自学的过程中,一定不要眼高手低,要实战,把学到的技术投入到项目当中,解决问题,之后进一步锤炼自己的技术。
技术学到手后,就要开始准备面试了,找工作的时候一定要好好准备简历,毕竟简历是找工作的敲门砖,还有就是要多做面试题,复习巩固。有需要面试题资料的朋友点击这里可以免费领取。
[外链图片转存中…(img-BC53VWRk-1712085966005)]
[外链图片转存中…(img-aQfKitLu-1712085966005)]
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!
[外链图片转存中…(img-bfDSsaSm-1712085966006)]
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:前端)

最后
技术是没有终点的,也是学不完的,最重要的是活着、不秃。零基础入门的时候看书还是看视频,我觉得成年人,何必做选择题呢,两个都要。喜欢看书就看书,喜欢看视频就看视频。最重要的是在自学的过程中,一定不要眼高手低,要实战,把学到的技术投入到项目当中,解决问题,之后进一步锤炼自己的技术。
技术学到手后,就要开始准备面试了,找工作的时候一定要好好准备简历,毕竟简历是找工作的敲门砖,还有就是要多做面试题,复习巩固。有需要面试题资料的朋友点击这里可以免费领取。
[外链图片转存中…(img-zpasUR9k-1712085966006)]