Created
April 8, 2025 07:35
-
-
Save RaajeevChandran/41b2646b58ab8447041cc0612d09151c 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
| override func containerViewDidLayoutSubviews() { | |
| super.containerViewDidLayoutSubviews() | |
| guard let presentedView, let containerView else { | |
| return | |
| } | |
| dimmedBackgroundView.frame = containerView.bounds | |
| grabberView.frame.origin.y = 8 | |
| grabberView.center.x = presentedView.center.x | |
| grabberView.layer.cornerRadius = grabberView.frame.height / 2 | |
| setupInteraction() | |
| presentedView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] | |
| presentedViewController.additionalSafeAreaInsets.top = grabberView.frame.maxY | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment