This is a SwiftUI application for iOS to efficiently load and display images in a scrollable grid. It shows a 3-column square image grid. The images are center cropped and are lazily loaded using disk and memory caching mechanisms to ensure smooth scrolling performance
- Image Grid: Show a 3-column square image grid. The images should be centercropped.
- Image Loading: Asynchronous image loading.
- Display: Ability to scroll through at least 100 images.
- Caching: Caching mechanism to store images retrieved from the API in both memory and disk cache for efficient retrieval.
- Error Handling: Handling of network errors and image loading failures gracefully, providing informative error messages and placeholders for failed image loads.
- Once user scrolls quickly, the image loading of non-visible grid items is cancelled and loading for the visible grid items is resumed.
-
Clone the repository to your local machine using: git clone https://github.com/nishitgoenkain/ImageLoader.git
-
Open the project in Xcode.
-
Build and run the project on a simulator or device.
- The app will initially load a grid of images from the API.
- Scroll through the grid to load more images lazily.
- Any errors encountered during image loading will be handled gracefully, with placeholders displayed for failed image loads.
- None
- Pagination can be added once the API supports it.