【发布时间】:2015-09-16 11:46:14
【问题描述】:
我正在学习 iOS 中的核心动画,首先我必须知道如何翻转视图中的图像数组
这里是我的示例代码:
NSArray *animationArray=[NSArray arrayWithObjects:
[UIImage imageNamed:@"homebg.png"],
[UIImage imageNamed:@"splash.jpg"],
[UIImage imageNamed:@"index3.png"],
[UIImage imageNamed:@"image2.png"],
[UIImage imageNamed:@"image4.png"],
[UIImage imageNamed:@"index6.png"],
nil];
imageView.backgroundColor=[UIColor purpleColor];
imageView.animationImages=animationArray;
imageView.transform = CGAffineTransformMakeScale(-1, 1);
imageView.animationDuration=3.9;
imageView.animationRepeatCount=0;
[imageView startAnimating];
它有效,但我不满意我希望图像具有动画效果并吸引最终用户
【问题讨论】:
-
为什么不将翻转的图像保存在另一个数组中并一个接一个地做动画?
标签: ios iphone uiimage core-graphics