`didDismissWithBackgroundTap` not called
alfredcc opened this issue · comments
here is the code in demo.
Is the sheet dismissed when tapping the background?
Is the sheet dismissed when tapping the background?
yep. I tapped on the background, the sheet was dismissed but the function was not called.
Ok, great. I'll check!
I can reproduce it in this demo.
My Xcode version is 13.0. os version: 14.7.1
@danielsaidi
here is the workaround
because the presenter is nil before sheet is presented.
sheet.present(in: self, from: cell.textLabel) {
sheet.presenter?.events.didDismissWithBackgroundTap = { print("Background tap!") }
}
Oh, great! I'll update the demo.
Demo updated, thank you!