I am trying to implement a feature in my app that is similar to Apple’s weather app. Here is a photo example:
From the looks of it, it is a button and when the user clicks on it, something else appears. What kind of SwiftUI control is that? Basically, what code made that button and resulting little (mini) menu that appears?
2
Answers
That would be a
Menu
.As per the Apple Developer Documentation, here is an example of usage:
If you want the button to open the menu to be an SF Symbol, like the ellipse with the three dots, you can call
Menu
a bit differently:That would be the
menu