I want to use the new Menu with SwiftUI but unfortunately there is one issue which I can't solve. After selecting one value of the Menu the Menutitle looks like so:
However I don't want the title to decrease it's opacity. How can I achieve this?
Here is my code:
struct ContentView: View {
@State private var selectionVariable = 0
let sampleDict = [0: "Sample Title 1", 1: "Sample Title 2"]
var body: some View {
Menu {
Picker(selection: $selectionVariable, label: Text("")) {
ForEach(sampleDict.sorted(by: <), id: \.key) { base, name in
Text(name)
}
}
}
label: {
Text("Eingaben im \(sampleDict[selectionVariable] ?? "")")
}
}
}
