Closed manasmahala closed 6 years ago
I had the same issue. Solved it by putting this inside viewController class
func showCaseDidDismiss(showcase: MaterialShowcase) {
//do what you want
}
func showCaseWillDismiss(showcase: MaterialShowcase) {
//do what you want
}
and also this outside
extension myViewController: MaterialShowcaseDelegate {
func showCaseWillDismiss(showcase: MaterialShowcase, didTapTarget: Bool) {
}
func showCaseDidDismiss(showcase: MaterialShowcase, didTapTarget: Bool) {
}
}
@alexprazeres : Thank you for helping out.
@manasmahala : Besides, you can check out the Sample
app which shows the steps to handle ShowcaseDelegate
.
https://github.com/aromajoin/material-showcase-ios/blob/c206da67c597f0f38ded95543da70e31940c1bef/Sample/MaterialShowcaseSample/ViewController.swift#L116
Hi,
I tried your sample app and the delegate methods were not being called
extension ViewController: MaterialShowcaseDelegate {
func showCaseWillDismiss(showcase: MaterialShowcase) {
}
func showCaseDidDismiss(showcase: MaterialShowcase) {
}
}
After having a quick look in the code I found out that in the completeShowcase
method the delegate tries to call
delegate?.showCaseWillDismiss?(showcase: self, didTapTarget: didTapTarget)
delegate?.showCaseDidDismiss?(showcase: self, didTapTarget: didTapTarget)
The didTapTarget:
parameter was missing, I write it here because it may be useful to someone else before you update the sample app
Thanks
showcase.delegate = self MaterialShowcase delegate method is not being called.