I have set up a "Picker" which works well, EXCEPT that the Label won't appear, I have struggled around this and I am sure the solution is very simple, here's what I have.
import SwiftUI
import SwiftData
struct iPadReadingsEntry: View {
@State private var whatOccasion: String = ""
let occassions = ["Misc", "Breakfast", "Mid Day Meal", "Evening Meal", "Bed Time"]
var body: some View {
.
.
.
HStack{
Picker("Before What Occasion :", selection: $whatOccasion ){
ForEach(occassions, id: \.self) {
Text($0)
}
}.pickerStyle(MenuPickerStyle())
.background(Color(red: 255, green: 253, blue: 208))
Spacer()
}.padding(.leading, 80)
.padding(.bottom, 30)
.
.
.
Picker label does not show except in some conditions. You have to find a work around to display the label independently.
Get details here: https://stackoverflow.com/questions/69381385/swiftui-custom-picker-label-not-rendering