-(void)end{
NSLog(@"End Called");
}
UIImage *bPin = [UIImage imageNamed:@"BluePin.png"];
UIImage *gPin = [UIImage imageNamed:@"GreenPin.png"];
UIImage *rPin = [UIImage imageNamed:@"RedPin.png"];
UIImage *yPin = [UIImage imageNamed:@"YellowPin.png"];
UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,bPin.size.width,bPin.size.height)];
image.animationImages = [NSArray arrayWithObjects:
bPin,
rPin,
gPin,
yPin,
nil];
image.animationRepeatCount = 0;
image.animationDuration = 1.0;
[image startAnimating];
[image setFrame: CGRectMake(point.x-(image.bounds.size.width/2), point.y-(image.bounds.size.width/2), image.bounds.size.width, image.bounds.size.height)];
[self.view addSubview: image];
[UIView animateWithDuration:2.0 delay:1.0 options:UIViewAnimationOptionCurveLinear animations:^{
[image setAlpha:0.0];
} completion:^(BOOL finished) {
[image removeFromSuperview];
}];
我想将图像发送到 void end 方法,但我该怎么做?我需要在那里结束它以便为某个图像设置动画......我该如何发送它??????