相关疑难解决方法(0)

UIImageView动画完成后的访问方法

我有一个图像数组加载到UIImageView中,我通过一个循环动画.显示图像后,我想@selector调用一个以关闭当前视图控制器.使用以下代码可以很好地动画图像:

NSArray * imageArray = [[NSArray alloc] initWithObjects:
                        [UIImage imageNamed:@"HowTo1.png"], 
                        [UIImage imageNamed:@"HowTo2.png"],
                        nil];
UIImageView * instructions = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

instructions.animationImages = imageArray;
[imageArray release];
instructions.animationDuration = 16.0;
instructions.animationRepeatCount = 1;
instructions.contentMode = UIViewContentModeBottomLeft;
[instructions startAnimating];
[self.view addSubview:instructions];
[instructions release];
Run Code Online (Sandbox Code Playgroud)

16秒后,我想要一个方法来调用.我查看了UIView类方法,setAnimationDidStopSelector:但我无法使用它来处理当前的动画实现.有什么建议?

谢谢.

iphone animation objective-c uiview uiimageview

12
推荐指数
3
解决办法
1万
查看次数

标签 统计

animation ×1

iphone ×1

objective-c ×1

uiimageview ×1

uiview ×1