Skip to content

Conversation

@Wouter125
Copy link
Owner

First implementation of adding a dismiss modifier that resembles the implementation of Apple. Based on PR #30 of @b0nsun9.

Setup includes;

  • Swipe to remove on smallest detent
  • Additional threshold of 50 before removing
  • Keeping a full animation activated instead of hard removal.

Still need to implement a few more things before merging, but it does the trick.

@Wouter125
Copy link
Owner Author

Wouter125 commented Jan 30, 2024

Sorry about this stale PR. I'm mostly working on this during my weekends so...

Anyways. While I was fixing this I noticed some other issues popping up. Currently I rewrote a couple of parts and am soon ready to release V3. It will come with;

  1. Improved animations.
  2. Several to-do's removed due to reimplementation of scaling.
  3. Support for keeping content centered while the card is growing.
  4. The Apple CornerRadius view modifier. https://developer.apple.com/documentation/swiftui/view/presentationcornerradius(_:)
  5. The Apple Background view modifier. https://developer.apple.com/documentation/swiftui/view/presentationbackground(alignment:content:)
  6. Improved Apple interaction modifier. https://developer.apple.com/documentation/swiftui/view/presentationbackgroundinteraction(_:)
  7. Additional swipe to dismiss modifier.

@Wouter125
Copy link
Owner Author

Wouter125 commented Feb 11, 2024

  • Fix alignment of content inside sheet since we now animating on height.

  • Fix background animation when moving it up. Currently only the inner contents animate.

  • Bring back the bg interaction modifier.

  • Optionally fix the issue where the sheet can’t be toggled visible mid-way animation anymore. Would need to store the view offscreen rather than removing it completely right now.

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.

2 participants