Labels and text inside Text Field becoming white automatically for iOS 13 Dark mode

前端 未结 5 1895
既然无缘
既然无缘 2021-02-05 10:38

My app works fine for iOS versions below 13.0 but when i updated the device to iOS 13 and chose Dark Mode, the labels are going white(which were black earlier) automatically whi

5条回答
  •  暖寄归人
    2021-02-05 11:28

    TextField(placeholder, text: self.$value)
                    .colorScheme(.light)
    

    You should add colorScheme attribute to avoid the textfield from dark mode.

提交回复
热议问题