Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ThemePicker in iOS Scrumdinger tutorial not displaying ThemeView colors

Tags:

ios

swift

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

like image 373
N1v3x Avatar asked Oct 12 '25 05:10

N1v3x


1 Answers

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)
like image 54
QQew Avatar answered Oct 14 '25 19:10

QQew