krz/daybyday

iOS app for children to learn days of the week, months, and seasons with audio assist.

clone: git clone https://gitbay.org/krz/daybyday.git

v1.3.2: WeatherView.swift · raw

 1//
 2//  WeatherView.swift
 3//  DayByDay
 4//
 5
 6import SwiftUI
 7
 8/// Displays all 8 weather types as large, tappable cards in a scrollable grid.
 9struct WeatherView: View {
10    private let columns = [
11        GridItem(.adaptive(minimum: 280), spacing: 24)
12    ]
13
14    var body: some View {
15        ScrollView {
16            LazyVGrid(columns: columns, spacing: 24) {
17                ForEach(LearnWeather.allCases) { weather in
18                    WeatherCard(weather: weather)
19                        .frame(height: 200)
20                }
21            }
22            .padding(32)
23        }
24    }
25}
26
27#Preview {
28    WeatherView()
29}