Patrefans
kavsoft from patreon
kavsoft patreon

SwiftUI: Drop Down Picker - Micro Interactions - Xcode 14 - SwiftUI Tutorials

🕑 Added 2023-01-07 21:12:46 +0000 UTC
SwiftUI: Drop Down Picker - Micro Interactions - Xcode 14 - SwiftUI Tutorials

Comments

ryan liu

Hello, great thanks for making this super effect. but I got a question is if the drop list is too long to fit the screen size, how to fix it?

Julien L.

Thank you that works :)

Kavsoft

Because the toolbar clips any view that passes over it, add it as an overlay to the NavigationStack as follows: NavigationStack{ } .overlay(.topTrailing){ DropDown() }

Kavsoft

It's only a prototype and can be improved, therefore I've included updated code with an advanced drop-down form that resembles a use case. Additionally, it offers zIndex as a choice, allowing us to use it for more sophisticated customisation. Look into it.

JiΕ™Γ­ OstatnickΓ½

Really nice effect, thanks for the component. Unfortunately, with this mask solution you can't have more than one drop down element in a screen. You can't have it in a form like this: ``` VStack { DropDown(...) DropDown(...) } ```

Julien L.

Hello, I am trying to add the dropdown menu to a .toolbar { ToolbarItem {} } inside of a NavigationStack. Unfortunately as soon as the menu expands I can't tap any of the buttons that are not selected. Does anyone have a solution for that? Thanks!


More Creators