diff --git a/Sources/FloatingBottomSheet/Presentation/FloatingBottomSheetPresentationController.swift b/Sources/FloatingBottomSheet/Presentation/FloatingBottomSheetPresentationController.swift index ac65784..8ac0149 100644 --- a/Sources/FloatingBottomSheet/Presentation/FloatingBottomSheetPresentationController.swift +++ b/Sources/FloatingBottomSheet/Presentation/FloatingBottomSheetPresentationController.swift @@ -144,15 +144,10 @@ public final class FloatingBottomSheetPresentationController: UIPresentationCont adjustBackgroundColors() guard let coordinator = presentedViewController.transitionCoordinator else { - // Calls viewWillAppear and viewWillDisappear - presentingViewController.beginAppearanceTransition(false, animated: false) dimmingView.alpha = 1.0 return } - // Calls viewWillAppear and viewWillDisappear - presentingViewController.beginAppearanceTransition(false, animated: coordinator.isAnimated) - coordinator.animate(alongsideTransition: { [weak self] _ in self?.dimmingView.alpha = 1.0 self?.presentedViewController.setNeedsStatusBarAppearanceUpdate() @@ -160,8 +155,6 @@ public final class FloatingBottomSheetPresentationController: UIPresentationCont } public override func presentationTransitionDidEnd(_ completed: Bool) { - // Calls viewDidAppear and viewDidDisappear - presentingViewController.endAppearanceTransition() if !completed { dimmingView.removeFromSuperview() @@ -175,15 +168,10 @@ public final class FloatingBottomSheetPresentationController: UIPresentationCont presentable?.bottomSheetWillDismiss() guard let coordinator = presentedViewController.transitionCoordinator else { - // Calls viewWillAppear and viewWillDisappear - presentingViewController.beginAppearanceTransition(true, animated: false) dimmingView.alpha = 0.0 return } - // Calls viewWillAppear and viewWillDisappear - presentingViewController.beginAppearanceTransition(true, animated: coordinator.isAnimated) - coordinator.animate { [weak self] context in self?.dimmingView.alpha = 0.0 if !context.isAnimated { @@ -194,8 +182,6 @@ public final class FloatingBottomSheetPresentationController: UIPresentationCont } public override func dismissalTransitionDidEnd(_ completed: Bool) { - // Calls viewDidAppear and viewDidDisappear - presentingViewController.endAppearanceTransition() if completed { presentable?.bottomSheetDidDismiss()