MWPhotoBrowser icon indicating copy to clipboard operation
MWPhotoBrowser copied to clipboard

UIButton in a custom MWCaptionView

Open tiwence opened this issue 9 years ago • 3 comments

Hi,

I'm using your very powerfull Browser in my app, and I have a little problem in my implementation of a custom MWCaptionView (with my own xib file).

I put in this custom CaptionView some uibutton, and I want to handle click button on these buttons. But nothing happens, because the touch event is handled by MWZoomingScrollView... Is there a way to fix this ? Maybe by overriding my own tapdelegate in the mwphotobrowser subclass ?

tiwence avatar May 17 '15 17:05 tiwence

Have you found a way to fix this? I have the exact same problem.

The work around I did was to add the view to the window, but that seemed too hackish.

jquiambao avatar Oct 19 '15 02:10 jquiambao

Actually, I just found the solution.

Modify initWithPhoto: in the MWCaptionView.m class to enable user interactions:

self.userInteractionEnabled = YES;

by default that's set to NO.

jquiambao avatar Oct 19 '15 02:10 jquiambao

I have a subclass of MWCaptionView, In my subclass Setting self.userInteractionEnabled = YES; worked for me

Pratik948 avatar Mar 27 '17 11:03 Pratik948