I added scroll images. With long-term printing, I gave an animation wobble for all the images. I want to show the delete button in the upper right corner of each image, as in the iphone, when we remove any application the same as this.
- (void)startWobble { for (UIView *imgView in viewsInScrollView) { UIButton *deleteImgButton = [[UIButton alloc] initWithFrame:CGRectMake(55,-7,12,12)]; [deleteImgButton setImage:[UIImage imageNamed:@"close_icon.png"] forState:UIControlStateNormal]; [deleteImgButton addTarget:self action:@selector(deleteImage:) forControlEvents:UIControlEventTouchUpInside]; [imgView addSubview:deleteImgButton]; imgView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(-5)); [UIView animateWithDuration:0.20 delay:0.0 options:(UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse) animations:^ { imgView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(5)); } completion:NULL ]; } } -(void)deleteImage : (id)sender { NSLog(@"Delete Image"); }
here the selector is not called .... how can I solve this .. ???
source share