I want to set the font to title2 for the items in the Picker (e.g..font(Font.title2.weight(.heavy))) so it’s of a size and type.
Unfortunately, it doesn’t read any font mentions and still displays super small font.
Here’s my code (I got rid of any of my failed experiments):
struct PlayView: View {
@State private var selectedLevel = "3"
let levels = ["1", "2", "3", "4", "5"]
@State private var selectedLife = "3"
let lives = ["1", "2", "3", "4", "5"]
@State private var selectedLetterMethod = "Sound"
let letters = ["Sound", "Written"]
@State private var showWelcomeView = false
var body: some View {
ZStack {
VStack() {
HStack{
Text("N:")
.font(Font.title2.weight(.heavy))
Picker("Level (n)", selection: $selectedLevel)
{
ForEach(levels, id: \.self) {
Text($0)
.font(.title2)
}
}
}
HStack{
Text("Lives:")
.font(Font.title2.weight(.heavy))
Picker("Lives", selection: $selectedLife) {
ForEach(lives, id: \.self) {
Text($0)
}
}
}
HStack{
Text("Letters:")
.font(Font.title2.weight(.heavy))
Picker("Letter display", selection: $selectedLetterMethod) {
ForEach(letters, id: \.self) {
Text($0)
}
}
}



