Question : swiftui foreach
Answered by : mobile-star
ForEach(1...5) { row in Text("Row \(row)")
}
Source : | Last Update : Wed, 11 Mar 20
Question : for each swiftui
Answered by : dangerous-dogfish
struct ContentView: View { let colors: [Color] = [.red, .green, .blue] var body: some View { VStack { ForEach(colors, id: \.self) { color in Text(color.description.capitalized) .padding() .background(color) } } }
}
Source : | Last Update : Tue, 14 Jan 20