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