動畫的各種屬性

2021-07-27 16:12:38 字數 1260 閱讀 8610

以下都是為了自己方便記憶所記錄的,沒有太多的時間去查閱,只能慢慢的充實。

android:interpolator="@android:anim/linear_interpolator"

android:fromdegrees="0"

android:todegrees="+90"

android:pivotx="50%"

android:pivoty="50%"

android:duration="500"

android:startoffset="-1"

android:repeatmode="restart"

android:repeatcount="-1"/>

interpolator 插值器,控制速率

fromdegrees

起始角度

todegress 結束角度 正值代表瞬時針,負值代表逆時針

pivotx 表示縮放的中軸點x座標,距離自身左邊緣的位置

pivoty 表示縮放的中軸點y座標,距離自身上邊緣的位置

duration 動畫持續時間

startoffset 動畫啟動時間

repeatmode 動畫重複方式

reverse和restart兩種方式,預設為animation.restart,animation.restart的意思就是說比如你設定重複次數為1,當執行完第一次動畫之後,回到動畫開始然後執行第二次動畫,而你設定animation.reverse時候,比如你動畫是從不透明—–>透明,執行完第一次動畫的時候,變為不透明,然後執行第二次動畫,他就從不透明到透明

repeatcount 動畫重複次數

float fromx 動畫起始時 x座標上的伸縮尺寸

float tox 動畫結束時 x座標上的伸縮尺寸

float fromy 動畫起始時y座標上的伸縮尺寸

float toy 動畫結束時y座標上的伸縮尺寸

int pivotxtype 動畫在x軸相對於物件位置型別

float pivotxvalue 動畫相對於物件的x座標的開始位置

int pivotytype 動畫在y軸相對於物件位置型別

float pivotyvalue 動畫相對於物件的y座標的開始位置

fromxtype x軸上開始點相對型別

fromxvalue 開始點的值

toxtype x軸上結束點相對型別

toxvalue, 結束點的值

y軸同理

IOS各種動畫

1。html view plain copy uibezierpath movepath uibezierpath bezierpath movepath movetopoint center movepath addquadcurvetopoint topos controlpoint cgpoi...

ObjectAnimatior 屬性動畫的相關屬性

objectanimator.offloat img,translationx 0f,200f setduration 2000 start 其中offloat 方法中的第二個引數為imageview 的相關屬性,可以傳入的值為goole提供的get,set 方法的相關屬性。常見的屬性有 trans...

UIView 的各種動畫效果

最普通動畫 開始動畫 uiview beginanimations nil context nil 設定動畫持續時間 uiview setanimationduration 2 動畫的內容 frame.origin.x 150 img setframe frame 動畫結束 uiview commi...