Questions tagged [swiftui-menu]
6 questions
6
votes
1 answer
Cannot set color of Button's Label inside Menu in SwiftUI
If I create a Menu in SwiftUI (iOS), I cannot set the color of the Buttons inside, e.g.:
Menu("Actions") {
Button(action: { }) {
Label("Whatever", systemImage: "pencil")
.background(Color.red) // does not work
}
…

noe
- 1,684
- 1
- 17
- 35
2
votes
1 answer
How to change the label of a Menu?
In a simple test project at Github I am trying to display a Menu with 3 languages and the flags to allow users select the localization:
struct ContentView: View {
// ...some Core Data related code skipped...
let labels = [
"en"…

Alexander Farber
- 21,519
- 75
- 241
- 416
1
vote
1 answer
How to change State variables one after another in SwiftUI?
I have a Menu with a few buttons. Each button, represents an URL.
On selecting one of the buttons I want to present a webView loading the said URL using .fullScreenCover(isPresented:)
@State private var showWebPage = false
@State private var…

Mihai Fischer
- 329
- 2
- 11
0
votes
0 answers
How to display the menu uncollapsed on navigationBar?
I want to display a picker with several options to choose one of them. I could do it but the problem is that the menu shows collapsed.
How can I show the menu display uncollapsed?
Example Code:
struct TestingView: View {
enum Options: String,…

Ariel Antonio Fundora
- 1,330
- 15
- 20
0
votes
1 answer
SwiftUI Menu Picker Style shows strange double arrow
Basically I am using Menu Picker Style for display a set of numbers. I prefer it over Menu because it doesn't have checkmark in front of the selected item and because I need to change the text of the menu it takes time to re-render it if the new…

Boyan Pavlov
- 61
- 6
0
votes
0 answers
Coding a SwiftUI button to trigger a Menu item
I am trying to design a button in swiftUI that will call 1 of the built in menu items (mac only). I know how to replace built in menu item & force it to share the same functionality with a button, but that is not what I want to do. I wish to click…

rbkopelman
- 39
- 3