NokiMo
kavsoft
kavsoft

patreon


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

Source Code For SwiftUI: Drop Down Picker - Micro Interactions - Xcode 14 - SwiftUI Tutorials.


Download Code πŸ‘‡

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

Comments

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?

ryan liu

Thank you that works :)

Julien L.

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.

Kavsoft

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(...) } ```

JiΕ™Γ­ OstatnickΓ½

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!

Julien L.


Related Creators