onBackgroundTap leaves empty view with white background
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];
}
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;
Same thing happening to me, empty view with white background; MDBox's solution didn't work for me.