Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public final class DefaultBottomSheetModalDismissalHandler: BottomSheetModalDism
}

public func performDismissal(animated: Bool) {
if let presentedViewController = presentingViewController {
if let presentedViewController = presentingViewController?.presentedViewController {
presentedViewController.dismiss(animated: animated, completion: dismissCompletion)
} else {
// User dismissed view controller by swipe-gesture, dismiss handler wasn't invoked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public final class BottomSheetPresentationController: UIPresentationController {
private func startInteractiveTransition() {
interactionController = UIPercentDrivenInteractiveTransition()

presentingViewController.dismiss(animated: true) { [weak self] in
presentedViewController.dismiss(animated: true) { [weak self] in
guard let self = self else { return }

if self.presentingViewController.presentedViewController !== self.presentedViewController {
Expand Down