Quartz、Core Animation、UIKit

有點(diǎn)兒迷:http://www.cnblogs.com/pengyingh/articles/2482408.html

博客園:http://www.cnblogs.com/mjios/




Core Animation :


Core Animation是直接作用在CALayer上的,并非UIView.

一.使用步驟

http://www.cnblogs.com/mjios/archive/2013/04/15/3021039.html


能用的動(dòng)畫類只有四個(gè)




具體:

CAAnimation:繼承NSObject,實(shí)現(xiàn)的代理有NSCoding,NSCopying,CAMediaTiming,CAAction

類方法:

//創(chuàng)建一個(gè)新的動(dòng)畫對象

+ (instancetype)animation;

//Animations implement the same property model as defined by CALayer.See CALayer.h for more details.

+ (nullable id)defaultValueForKey:(NSString *)key;

方法:

- (BOOL)shouldArchiveValueForKey:(NSString *)key;

屬性:

動(dòng)畫切入方式 timingFunction

Delegate:

- (void)animationDidStart:(CAAnimation *)anim;

- (void)animationDidStop:(CAAnimation *)anim;

CAAnimation's SubClass:? ? CAPropertyAnimation

類方法:

//Creates a new animation object with its 'keyPath' property set to 'path'

+ (instancetype)animationWithKeyPath:(nullable NSString *)path;

屬性:

動(dòng)畫描述:keyPath

設(shè)置動(dòng)畫:CAValueFunction * valueFunction

CAPropertyAnimation's SubClass:? ? CABasicAnimation

@property(nullable,strong)idfromValue;

@property(nullable,strong)idtoValue;

@property(nullable,strong)idbyValue;

CAPropertyAnimation's subClass CAPropertyAnimation

屬性太多看官方文檔吧.



重要!!!!

animationWithKeyPath的值: 列表https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/Key-ValueCodingExtensions/Key-ValueCodingExtensions.html


transform.scale = 比例轉(zhuǎn)換

transform.scale.x = 寬的比例轉(zhuǎn)換

transform.scale.y = 高的比例轉(zhuǎn)換

transform.rotation = 旋轉(zhuǎn)

transform.rotation.z = 平面圓的旋轉(zhuǎn)

opacity = 透明度

margin = 邊距

zPosition

backgroundColor = 背景色

cornerRadius = 圓角

borderWidth

bounds

contents

contentsRect

frame

hidden

mask

masksToBounds

opacity

position = 位置

shadowColor

shadowOffset

shadowOpacity

shadowRadius

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容