Please sign in to comment.
[NavigationDrawer] Adding a top inset delegate for the drawer (#5674)
**Context:** Clients need a way to know the content inset of the drawer to be able to lay out their content appropriately. **The Problem:** Because things like the status bar, safe area, and the top handle take up more space at the top of the drawer, the content that is laid out initially will be clipped if not able to move the content appropriately as the drawer is dragged. **The Fix:** Add an MDCBottomDrawerViewControllerDelegate that listens to topInset changes as the drawer is dragged and provides the top inset in which the content should be laid out below. **Testing:** Unit Test + Tested on an iPhone X and iPhone 7 on all examples, portrait and landscape.
- Loading branch information
Showing with 78 additions and 6 deletions.
- +10 −1 components/NavigationDrawer/examples/BottomDrawerWithHeaderExample.swift
- +1 −3 components/NavigationDrawer/examples/supplemental/BottomDrawerSupplemental.swift
- +0 −1 components/NavigationDrawer/src/MDCBottomDrawerPresentationController.m
- +25 −0 components/NavigationDrawer/src/MDCBottomDrawerViewController.h
- +17 −0 components/NavigationDrawer/src/MDCBottomDrawerViewController.m
- +4 −0 components/NavigationDrawer/tests/unit/MDCNavigaitonDrawerFakes.m
- +3 −1 components/NavigationDrawer/tests/unit/MDCNavigationDrawerFakes.h
- +18 −0 components/NavigationDrawer/tests/unit/MDCNavigationDrawerScrollViewTests.m