[UIView transitionWithView:self.cardImageView
duration:0.2f
options:UIViewAnimationOptionAllowUserInteraction |
UIViewAnimationOptionLayoutSubviews
animations:^(void) {
[self.cardImageView setFrame:[self frameForImageView]];
[page setAlpha:!fullscreenTemplate];
[saveExitButton setAlpha:!fullscreenTemplate];
[optionsButton setAlpha:!fullscreenTemplate];
if(fullscreenTemplate) {
[self.cardImageView.layer setBorderColor:[UIColor clearColor].CGColor];
[self.view setBackgroundColor:[UIColor blackColor]];
} else {
[self.cardImageView.layer setBorderColor:[UIColor fiftyGray].CGColor];
[self.view setBackgroundColor:[UIColor clearColor]];
}
} completion:^(BOOL finished) {
[scroller setScrollEnabled:!fullscreenTemplate];
}];
Above code has changed animateWithDuration:completion:
method with transitionWithView:duration:options:animations:completion:
method.
Importent keyWord here is UIViewAnimationOptionAllowUserInteraction
. This will allow userInteraction while the image is animating.
If TapGesture still stops recognising after some time, plz show me the code of your tapImageView
method.