我有 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");}
请帮我找到答案!