- (IBAction)didTouchAnimate:(UIButton*)sender {
UIImage *starImage = [UIImage imageNamed:@"star.png"];
UIImageView *starView = [[UIImageView alloc] initWithImage:starImage];
[starView setCenter:sender.center];
[UIView animateWithDuration:1.50f delay:0.0f options:UIViewAnimationCurveEaseInOutanimations:^{
[starView setCenter:CGPointMake(+100, +100)];
[starView setAlpha:0.6f];
}
completion:^(BOOL finished){
[starView removeFromSuperview];
// points++;
// NSLog(@"points: %i", points);
}];
[self.view addSubview:starView];
}
나는 배열 목록을 가지고 있습니다. 이러한 이미지를 어떻게 애니 메이팅 할 수 있습니까?이미지 배열에 애니메이션을 적용하는 UIImage
Dollars.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"score_animate_0001.png"],
[UIImage imageNamed:@"score_animate_0002.png"],
[UIImage imageNamed:@"score_animate_0003.png"],
[UIImage imageNamed:@"score_animate_0004.png"],
[UIImage imageNamed:@"score_animate_0005.png"],
[UIImage imageNamed:@"score_animate_0006.png"],
[UIImage imageNamed:@"score_animate_0007.png"],nil];
안녕 친구 (didTouchAnimate) 클릭하면 올바르게 움직일 것이다.하지만 내 문제는 그 때 나는 모든 배열 이미지를 클릭하고 (didTouchAnimate) 애니메이션을 적용하고 싶습니다. 이 문제가 발생하면 도와주세요. – Balaji