Created
April 8, 2025 02:12
-
-
Save RaajeevChandran/f32f641547ffda289d5a0767a635ab5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BottomSheetTransitioningDelegate: NSObject { | |
| let transition: BottomSheetTransition | |
| override init() { | |
| self.transition = BottomSheetTransition() | |
| } | |
| } | |
| extension BottomSheetTransitioningDelegate: UIViewControllerTransitioningDelegate { | |
| func animationController( | |
| forPresented presented: UIViewController, | |
| presenting: UIViewController, | |
| source: UIViewController | |
| ) -> UIViewControllerAnimatedTransitioning? { | |
| transition.presenting = true | |
| transition.wantsInteractiveStart = false | |
| return transition | |
| } | |
| func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { | |
| transition.presenting = false | |
| return transition | |
| } | |
| func interactionControllerForDismissal(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? { | |
| transition.presenting = false | |
| return transition | |
| } | |
| func presentationController( | |
| forPresented presented: UIViewController, | |
| presenting: UIViewController?, | |
| source: UIViewController | |
| ) -> UIPresentationController? { | |
| BottomSheetPresentationController(presentedViewController: presented, | |
| presenting: presenting) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment