UIImageView动画图像,找出正在显示的图像

时间:2013-11-11 13:00:01

标签: ios objective-c uiimageview

我有UIImageView通过动画显示图像。请参阅下面的代码

NSArray *images = [NSArray arrayWithObjects:[UIImage imageNamed:@"Banner1.png"],[UIImage imageNamed:@"Banner2.png"],[UIImage imageNamed:@"Banner3.png"], nil];
    BannerImageView.animationImages = images;
    BannerImageView.animationDuration = 9;

    [BannerImageView startAnimating];

现在我想知道当我触摸UIImageView(或添加在UIImageView之上的透明按钮)时显示哪个图像

- (IBAction)BannerPressed:(id)sender {

[BannerImageView stopAnimating];
NSLog(@"How would i know what image currently showing on BannerView");}

请帮我找到答案!

0 个答案:

没有答案