Animation-Layer

Animatable properties

Layer animations have some properties for developers to control.

Position & Size & Transform

position

modify this to animate the position of the layer within it’s parent layer.

bounds

modify this to animate the bounding frame of the layer.

transform

modify this to move,scale,and rotate the layer.You can even animate layers in 3D space.

Border

a layer’s borderColor,borderWidth,cornerRadius can be modified to change a layer’s appearance.

Shadow

shadowOffset : contro a shadow appear closer to or further away from a layer
shadowOpacity : modify this to make the shadow fade in or out.
shadowPath : modify this to change the shape of the layer’s shadow.
shadowRadius : modify this to control the blur(模糊度) of the shadow; this is especially useful when simulating movement of the view towards(朝向) or away from the surface(外观) where the shadow is cast(投射). 这个属性在这个情况下很有用:控制一个 view 靠近或离远时,设置 view 的 shadow 模糊度从而使动画更惟妙惟肖。

Contents

contents : modify this to assign(指定) a raw(原始的) TIFF or PNG data as the layers contents
mask : modify this to establish(放置) the shape or image you’ll use to mask the visible contents of the layer. 将一个形状图层或者图片放置到 layer 上形成遮盖
opacity(透明度) : animate the transparency of the layer contents

this is only a partial list of properties you can niamate;

Animations vc real content

when you start animating a textfield ,you’re not actually seeing the field itself animated; instead ,you’re seeing a cached version of it known as the presentation layer. The presentation layer is moved from the screen once the animation completes,and the original layer show itself again. So , you can’t tap the animated field , enter any text , because it’s not the truly field.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值