
Почему фон TextField остается белым после того, как я настроил его на использование определенного цвета? Почему он все еще накладывается на белый?
import SwiftUI
struct ContentView: View {
@State var search: String = ""
var body: some View {
ZStack{
Color.baseColour
.edgesIgnoringSafeArea(.all)
VStack(alignment: .center, spacing: 0) {
HStack(alignment: .center, spacing: 0) {
TextField("Search for a profile... ", text: $search)
.textFieldStyle(RoundedBorderTextFieldStyle())
.cornerRadius(15)
.background(Color.textFieldBarColour)
}
.frame(width: UIScreen.main.bounds.width - 30)
.background(Color.textFieldBarColour)}