SebastianBoldt / Jelly

🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
http://www.sebastianboldt.com/
MIT License
2.45k stars 123 forks source link

Add tapBackgroundToDismiss when backgroundStyle == .none #31

Closed JustinM1 closed 7 years ago

JustinM1 commented 7 years ago

add an invisible backgroundView to register tapGestures.

JustinM1 commented 7 years ago

After having a little time to look at the code, rather than creating a new view type for .none, maybe its better to add an associated value to the backgroundStyle.dimmed case with an alpha property. Similar to how you have effectStyle for the .blur case. If you set the alpha to 0, you get a transparent background with the gesture functionality. It provides users more control over the presentation appearance without having to change much code. If you agree, I can make the necessary changes and make a pull request.

SebastianBoldt commented 7 years ago

Removed .none state from the App in https://github.com/SebastianBoldt/Jelly/commit/6b2f7191c66034c3e1c02d62f8ea3961d39f319a. Will be available in 1.2.2