Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toshi0383
Copy link

@toshi0383 toshi0383 commented Feb 22, 2022

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.

@CLAassistant
Copy link

CLAassistant commented Feb 22, 2022

CLA assistant check
All committers have signed the CLA.

@@ -345,7 +345,7 @@ private extension PanModalPresentationController {
in the presentation animator instead of here
*/
containerView.addSubview(presentedView)
containerView.addGestureRecognizer(panGestureRecognizer)
presentedView.addGestureRecognizer(panGestureRecognizer)
Copy link
Author

@toshi0383 toshi0383 Feb 22, 2022

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
Copy link
Author

@toshi0383 toshi0383 Feb 22, 2022

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.

@toshi0383 toshi0383 changed the title feat: impl Sheet like behavior feat: impl "Sheets" like behavior Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Sheets" like UX option
2 participants