I looked through the completed version of this lesson, and it also does not show the background color. I'm wondering if this has to do with different versions of Swift/XCode
Expected view
Actual view in project
If you use the latest version of iOS, in the ThemePicker file you can try to chose picker style. This is how it will looks in iOS 16.2
var body: some View {
Picker("Theme", selection: $selection){
ForEach(Theme.allCases) { theme in
ThemeView(theme: theme)
.tag(theme)
}
}
.pickerStyle(.navigationLink)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With