SwiftKickMobile / SwiftMessages

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

tapHandler not called #320

Closed PawanmSpaceo closed 5 years ago

PawanmSpaceo commented 5 years ago

I have implement your code for custom popup

let view: CustomRateView = try! SwiftMessages.viewFromNib()
view.configureNoDropShadow()
view.cancelAction = {
    callBack?(false)
    SwiftMessages.hide()
}
view.tapHandler = { _ in
    callBack?(false)
}
var config = SwiftMessages.defaultConfig
config.presentationContext = .window(windowLevel: UIWindow.Level.alert)
config.duration = .forever
config.presentationStyle = .bottom
config.dimMode = .gray(interactive: true)
SwiftMessages.show(config: config, view: view)
wtmoose commented 5 years ago

I can't troubleshoot your custom view without the code. I suggest that you step through the function installTapRecognizer() and identify if all of the conditions are met and make sure that backgroundView has user interaction enabled and that nothing is blocking it.