ImageSlideshow icon indicating copy to clipboard operation
ImageSlideshow copied to clipboard

Tap to dismiss the full-screen image

Open zvonicek opened this issue 9 years ago • 3 comments

Issue created upon the feature request from other user. The gesture is conflicting with double tap to zoom-in so this needs to be addressed.

zvonicek avatar Apr 17 '16 16:04 zvonicek

My suggestion ( no iOS coding skills ) is to have a timeout after the first tap. If the timeout fully runs dry, trigger the dismissal, otherwise trigger the zoom in.

At least that is how I'd do it in javascript and it's foolproof. The timeout should be configurable.

edi avatar Apr 17 '16 20:04 edi

Was the same task, maybe this helps

//BACK
UITapGestureRecognizer *tapToGoBack;
if (tapToGoBack == nil) {
    tapToGoBack = [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(goBackTap)];
    [tapToGoBack setNumberOfTapsRequired: 1];
}
[self.collectionView addGestureRecognizer: tapToGoBack];

//ZOOM
UITapGestureRecognizer *tapToZoomImage;
if (tapToZoomImage == nil) {
    tapToZoomImage = [[UITapGestureRecognizer alloc] initWithTarget: self action: @selector(zoomImageTap)];
    [tapToZoomImage setNumberOfTapsRequired: 2];
}
[self.collectionView addGestureRecognizer: tapToZoomImage];
[tapToGoBack requireGestureRecognizerToFail:tapToZoomImage];

NikKovIos avatar Jun 15 '16 12:06 NikKovIos

If it works, you should create a PR @NikKovV.

edi avatar Jun 15 '16 13:06 edi