EXPhotoViewer icon indicating copy to clipboard operation
EXPhotoViewer copied to clipboard

onBackgroundTap leaves empty view with white background

Open DevGW opened this issue 11 years ago • 2 comments

I have implemented a tap gesture on an UIImageView and this appears to work as the image is presented and zoomed on tap.

however, when I tap again to dismiss, I am left with an empty view that has a white background, not my original view.

Any help would be greatly appreciated.

Here is the code I am using to call EXPhotoViewer on tap

- (void) imageTapped: (UITapGestureRecognizer *)recognizer {
    NSLog(@"image tapped!");
    UIImageView *tappedView = (UIImageView *)recognizer.view;
    [EXPhotoViewer showImageFrom:tappedView];
}

DevGW avatar Nov 27 '14 17:11 DevGW

I had the same problem.

In the "- (void) showImageFrom:(UIImageView*) imageView" method comment out the last line. This is a reference to the original imageView and it is setting it to nil. Hope this helps.
//imageView.image = nil;

MDBox avatar Jan 24 '15 04:01 MDBox

Same thing happening to me, empty view with white background; MDBox's solution didn't work for me.

jlcv avatar Feb 12 '15 18:02 jlcv