SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.24k stars 741 forks source link

Button in CustomView Tap not work #500

Closed ducbm051291 closed 1 year ago

ducbm051291 commented 1 year ago

I create a custom view to show with SwiftMessages, it shows beautifully but I have a close button inside that I want to handle the touchUpInside event to dismiss the message myself but it doesn't work. I think it must be the PassthroughView and its hitTest function which block the button's interactive. Could you help me about this case? I tried inheritage the MessageView and set my close button to MessageView's button but doesn't work either.

wtmoose commented 1 year ago

It’s almost certainly a problem with your view. Generally there’s no issue with interacting with custom views. Please reopen if you still need help.