All Versions
Latest Version
Avg Release Cycle
10 days
Latest Release
1400 days ago

Changelog History

  • v0.1.0 Changes

    August 21, 2020


    Check out the new .onLayoutForSizeClass modifier!

    โšก๏ธ With .onLayoutForSizeClass you can update your state variables to layout your drawer for landscape.

    Resting heights are now binding!

    This means you can keep a state variable to contain your view heights. Instead of using the old .locked modifier, just change the resting heights parameter to a single height.

    ๐Ÿ†• New Documentation Layout

    The Readme is more concise, but it now contains links to other markdown files for Examples and Reference.

  • v0.0.4-beta Changes

    July 18, 2020

    [Beta] Landscape

    Introducing behaviors for landscape and split view orientations

    ๐Ÿ†• New View Modifiers


    0๏ธโƒฃ Defines the horizontal alignment for the drawer. The default is fullscreen.

    public enum DrawerAlignment { case leading, center, trailing, fullscreen}


    Drawer(heights: [100, 340]) {} .width(.constant(340)) .alignment($alignment)


    Defines a width for the drawer when not in fullscreen alignment.


    Drawer(heights: [100, 340]) {}.width(.constant(340))


    โšก๏ธ A callback to receive updates when the drawer is laid out for a new size class.

    This closure is executed every time the device layout changes (portrait, landscape, and split view).
    ๐Ÿ‘‰ Use this to modify your view when the drawer's layout changes.

    Alter the resting heights and alignment when the screen layout changes.

    Drawer(heights: [100, 340]) {} .onLayoutForSizeClass { (sizeClass) inswitch (sizeClass.horizontal, sizeClass.vertical) { case (.compact, .compact):// smaller iPhone landscapebreakcase (.compact, .regular):// iPhone portrait// iPad portrait splitview// iPad landscape smaller splitviewbreakcase (.regular, .compact):// larger iPhone landscapebreakcase (.regular, .regular):// iPad fullscreen// iPad landscape larger splitviewbreakdefault:// Unknown layoutbreak } }
  • v0.0.3 Changes

    July 16, 2020

    ๐Ÿฑ ๐Ÿฅณ New Declarative View Modifiers!

    ๐Ÿ‘ Thank you for all your support and feature requests!

    New declarative view modifiers will help you customize the drawer experience. Shoutout to u/pupdogg007 for my favorite requested feature: locking the drawer.

    ๐Ÿ“ฑ I also spent a lot of time refining the fluidity of the drawer animations. In v0.0.2, I made the drags more responsive by toggling animation. In v0.03, after formulating a function on Desmos, I am introducing 'springiness' to the drawers when they are pulled beyond their boundaries. This animation feels more fluid by asymptotically reducing the influence of a drag.

    ๐Ÿ”’ ๐Ÿ”’ Locked

    Locks the drawer in a controlled position. When set to true, the drawer will animate into the locked height.

    ๐Ÿ”’ Lock into the current resting height

    /\*Drawer\*/.locked($locked) { (currentPosition) inreturn currentPosition }

    ๐Ÿฑ ๐Ÿช€ Spring

    Sets the springiness of the drawer when pulled past boundaries.

    The user's drag displacement is transformed by a logistic curve for a natural hard-spring pull that reaches an asymptote.


    ๐Ÿฑ ๐Ÿ˜ด OnRest

    โšก๏ธ A callback to receive updates when the drawer reaches a new resting level. This closure is executed every time the drawer reaches a new resting hieght. Use this when you want to receive updates on the drawer's changes.

    /\*Drawer\*/.onRest { (restingHeight) inprint(restingHeight) }

    ๐Ÿฑ ๐Ÿ’ฅ Impact

    Sets the haptic impact of the drawer when resting


    Other Notes

    ๐Ÿ—„ Deprecated the init's impact parameter to prefer the declarative modifier.

  • v0.0.1 Changes

    July 14, 2020

    Edited Animation

    ๐Ÿš€ The animation is now disabled when dragging for increased responsiveness, and the release animation is now a spring.

    ๐Ÿ†• New Haptics

    Haptic impact can be defined when the drawer reaches a resting height, using a UIImpactFeedbackGenerator.

  • v0.0.0

    July 14, 2020