【发布时间】:2011-11-18 04:17:01
【问题描述】:
我有一个代码:
NSArray * imageArray = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"1.png"],
[UIImage imageNamed:@"2.png"],
[UIImage imageNamed:@"3.png"],
[UIImage imageNamed:@"4.png"],
[UIImage imageNamed:@"5.png"],
[UIImage imageNamed:@"6.png"],
[UIImage imageNamed:@"7.png"],
[UIImage imageNamed:@"8.png"],
[UIImage imageNamed:@"9.png"],
[UIImage imageNamed:@"10.png"],
[UIImage imageNamed:@"11.png"],
[UIImage imageNamed:@"12.png"],
nil];
UIImageView * imgView = [[UIImageView alloc] initWithFrame:
CGRectMake(100, 125, 150, 130)];
imgView.animationImages = imageArray;
imgView.animationDuration = 2;
imgView.contentMode = UIViewContentModeBottomLeft;
[self.view addSubview:imgView];
[imgView startAnimating];
如您所见,此代码实现了 imageArray 中图像集合的动画(更改)。
在动画过程中,每个图像都以恒定的时间间隔变化,可以说它以 easeNone 过渡动画。
但是,如何使用 easeIn、easeInOut 过渡制作此动画?
【问题讨论】:
标签: objective-c ios animation uiimageview transitions