-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: impl "Sheets" like behavior #169
base: master
Are you sure you want to change the base?
Conversation
@@ -345,7 +345,7 @@ private extension PanModalPresentationController { | |||
in the presentation animator instead of here | |||
*/ | |||
containerView.addSubview(presentedView) | |||
containerView.addGestureRecognizer(panGestureRecognizer) | |||
presentedView.addGestureRecognizer(panGestureRecognizer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required but breaking change here.
IMO this makes more sense though, because the background area shouldn't be pull-to-dismissable.
@@ -54,7 +75,9 @@ class SampleViewController: UITableViewController { | |||
return | |||
} | |||
dismiss(animated: true, completion: nil) | |||
presentPanModal(rowType.presentable.rowVC) | |||
let vc = rowType.presentable.rowVC | |||
hitTestView.hitTestDelegateView = vc.view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
containerView
have to be isUserInteractionEnabled: false
to enable user interaction in presentingVC
, so this did the trick to also enable it in presentedVC
.
Summary
fixes: #168
169.mp4
Requirements (place an
x
in each[ ]
)I've read and understood the Contributing Guidelines and have done my best effort to follow them.
I've read and agree to the Code of Conduct.
I've written tests to cover the new code and functionality included in this PR.