IOS_CABasicAnimation
来源:互联网 发布:法国斗牛犬 知乎 编辑:程序博客网 时间:2024/06/02 03:19
原文地址:IOS_CABasicAnimation作者:青鳥Ayukyo
structure field:
keypath:
//
// ViewController.m
// CABasicAnimationDemo
//
// Created by user on 13-1-23.
// Copyright (c) 2013年 user. All rightsreserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)dealloc
{
[_animationKeyPaths release];
[_button release];
[_imageView release];
[super dealloc];
}
- (void)viewDidLoad
{
[super viewDidLoad];
// @"translation",
// @"translation.x",
// @"translation.y",
// @"translation.z",
//
// @"rotation",
// @"rotation.x",
// @"rotation.y",
// @"rotation.z",
// @"scale",
// @"scale.x",
// @"scale.y",
// @"scale.z",
_animationKeyPaths = [[NSArray alloc]initWithObjects:
@"opacity",
@"cornerRadius",
@"borderWidth",
@"zPosition",
keypath:
我们可以通过animationWithKeyPath键值对的方式来改变动画
animationWithKeyPath的值:
transform.scale = 比例轉換
transform.scale.x = 闊的比例轉換
transform.scale.y = 高的比例轉換
transform.rotation.z = 平面圖的旋轉
opacity = 透明度
margin
zPosition
backgroundColor
cornerRadius
borderWidth
bounds
contents
contentsRect
cornerRadius
frame
hidden
mask
masksToBounds
opacity
position
shadowColor
shadowOffset
shadowOpacity
shadowRadius
//
//
//
//
//
//
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)dealloc
{
}
- (void)viewDidLoad
{
//
//
//
//
//
//
//
//
//
//
//
//
//