-
Hi, I was curious if a Picker view can be displayed using SwiftUI navigation pattern using the destination enum? I saw that alerts, sheets etc are covered, but Picker does not have a $isPresented initializer, and I could not find any examples. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
jshier
Jan 29, 2024
Replies: 1 comment 3 replies
-
Presenting pickers that way was the style way back in iOS 6, but since then integrating them directly into screens is preferred, since the screens are much larger. Otherwise you'd have present it inside a sheet with custom detents. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah. Menus don't have any presentation, you simply trigger actions. There's no way to know when it's in the open state. Closest you can get is separating the tap from the long press action with the
primaryAction
closure.