0
我有一個CABasicAnimation
與.fromValue
和.toValue
,在一個PNG圖像與圖像202移動,並通過一個CABasicAnimation與幀
也我用CALayer
保持image.png顯示它們一項的陣列
,它通過序列 通過所有圖像的問題,我希望通過展示,我將放在一個NSArray
這裏幀圖像是我的代碼:
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"sampleIndex"];
anim.fromValue = [NSNumber numberWithInt:1];
anim.toValue = [NSNumber numberWithInt:203];
anim.duration = 1.75f;
anim.repeatCount = HUGE_VALF;
anim.autoreverses = YES;
[myImage addAnimation:anim forKey:nil];
和幀的陣列是:
frames = (753, 377, 798, 422) ,
(706, 377, 751, 422) ,
(659, 377, 704, 422) ,
(612, 377, 657, 422) ,
(565, 377, 610, 422) ,
(518, 377, 563, 422) ,
(518, 424, 563, 468) ,
(471, 424, 516, 468) ,
(424, 424, 469, 468) ,
(471, 377, 516, 422) ,
(424, 377, 469, 422) ,
(377, 377, 422, 422) ,
(330, 377, 375, 422) ,
等....
任何想法??
我只有1圖像包含202圖像 – Mutawe
考慮提取幀並保存爲單獨的圖像。 –
我沒有工具給我通常相同的框架! – Mutawe