This is an iOS app built with SwiftUI that displays a map with weather data for selected cities.
- See a map with annotations for predefined major cities
- Tap on a city annotation to see the current temperature
- Day/night mode toggle to switch between light and dark themes
- List view showing all cities and their current temperatures
- Detail views for each city with extended forecasts
This app uses:
- SwiftUI for the UI and views
- MapKit to display the city map annotations
- CoreLocation to get geographic data
- Combine framework to manage state
- MVVM architecture and observable objects
Some key classes:
CityViewModel
- Fetches and stores weather data for citiesMapView
- Displays a map with city annotationsCityDetail
- Shows additional weather data for a city
To run this app on your local machine:
- Clone this repo
- Open project in Xcode
- Run the SwiftUI preview or build to a simulator/device target
Feel free to use this as a starting point for implementing weather functionality in your own SwiftUI apps!
Contributions and ideas to improve this are welcome! Please open an issue or submit a pull request with any fixes or new features.
Some ideas:
- Adding network calls to fetch real-time weather data
- Implementing data persistence
- Support for additional cities
- Visual weather effects on map
- Animations and transitions# supreme-funicular
- Add a LLM to simulate weather iformationand give users more details. SwiftUI WeatherApp created with TraceAI