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

Pull to Dismiss UIScrollView drawers. #58

Merged
merged 3 commits into from
Apr 12, 2018
Merged

Conversation

andersio
Copy link
Contributor

@andersio andersio commented Apr 5, 2018

Drawer Content VCs may enable pull to dismiss simply by setting scrollViewForPullToDismiss on the drawer presentation controller. Supports iOS 11 Large Title.

pull-to-dismiss

@andersio andersio self-assigned this Apr 5, 2018
@andersio andersio changed the title Anders/pull to dismiss Pull to Dismiss Apr 5, 2018
@andersio andersio changed the title Pull to Dismiss Pull to Dismiss with UIScrollView. Apr 5, 2018
@andersio andersio changed the title Pull to Dismiss with UIScrollView. Pull to Dismiss UIScrollView drawers. Apr 5, 2018
@andersio andersio force-pushed the anders/pull-to-dismiss branch 3 times, most recently from 40b22bf to 4346e03 Compare April 6, 2018 00:20
@andersio andersio force-pushed the anders/pull-to-dismiss branch 4 times, most recently from 675c27e to 13831b8 Compare April 6, 2018 22:27
@andersio andersio removed the BLOCKED label Apr 6, 2018
@andersio andersio force-pushed the anders/pull-to-dismiss branch 2 times, most recently from f9179f3 to 19a4253 Compare April 7, 2018 11:58
@andersio andersio force-pushed the anders/pull-to-dismiss branch 8 times, most recently from fc820ea to 5c1026b Compare April 9, 2018 19:30
@andersio andersio force-pushed the anders/pull-to-dismiss branch 3 times, most recently from 8a5803b to 2f62621 Compare April 10, 2018 10:37
wltrup
wltrup previously approved these changes Apr 11, 2018
Copy link
Contributor

@wltrup wltrup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Our conversation while going to get lunch helped me to understand what you did here, so thanks for that!

@@ -54,6 +86,10 @@ extension PresentationController {
}

override func presentationTransitionWillBegin() {
// NOTE: `targetDrawerState.didSet` is not invoked within the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's supposed to be common knowledge (that the property observers don't get triggered inside initialisers) so I don't think we need the comment here.

/// obscure `UINavigationBar` Large Title mechanism.
///
/// - note: The drawer presentation controller does not retain the view.
var scrollViewForPullToDismiss: UIScrollView? { get set }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice documentation. 💯

@sergdort sergdort merged commit 61c8681 into master Apr 12, 2018
@andersio andersio deleted the anders/pull-to-dismiss branch April 12, 2018 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants