- This sample app demonstrates how to fetch and display a list of movies from the movie database API. It uses the MVVM (Model-View-ViewModel) design pattern and Combine for handling asynchronous data.
Screen.Recording.2023-07-11.at.2.58.49.AM.mov
- Fetch and display movies from an API
- Display movie details such as title and release date
- Handle image loading and caching
Clone this repository:
1. Copy code
git clone https://github.com/yourusername/SwiftUI-MVVM-Combine.git
2. Open the project in Xcode.
3. change <YOUR API KEY> to real API(this app used API from the 'themoviedb')
4. Run the project in the iOS simulator or a real device.
iOS 14.0 or later Xcode 12.0 or later Swift 5 or later
SwiftUI Combine
-
ViewModel
- Contains
MovieListViewModel
that fetches the data from the API and prepares it for the View.
- Contains
-
Model
- Contains the
Movies
model andMovieResponse
model.
- Contains the
-
View
- Contains
MovieListView
which displays the list of movies.
- Contains
-
Services/Utilities(Helpers)
- Contains
ImageLoader
andImageCache
for handling image loading and caching.
- Contains
This project is available under the MIT license. See the LICENSE file for more info.
Feel free to contribute, and contact the owner for any questions.
hajime(JongMyeong Ha) contact@hajime.guru
This is a basic structure for a README. Feel free to add more sections or details according to your project's needs. You can check out more details or instructions in here