A test assignment for Autodoc: an iOS app that displays a news feed with paginated loading.
- Paginated loading and display of news
- All requests use
async/await - Optimized for iPad
- No third-party libraries
- Minimum iOS version โ 16.0, Swift โ 5.10
- UIKit, layout in code
- Use
DiffableDataSourceinstead of the legacyUICollectionViewDataSource - Use a state in the
ViewModelinstead of boolean flags - Cache must not be reset when the app goes to background
- Data source:
https://webapi.autodoc.ru/api/news/1/15(the first number is the page, the second is the number of items per page)
UIKitMVVMCombineUICollectionViewCompositionalLayoutDiffableDataSourceasync/awaitBackground URLSessionWKWebView
- UIKit โ layout entirely in code, no Storyboard/XIB
- MVVM โ separation of UI and business logic
- Combine โ reactive bindings between the
ViewModeland theViewController - State โ a single screen state instead of a set of boolean flags in the
ViewModel - UICollectionView + CompositionalLayout โ flexible and adaptive feed layout
- DiffableDataSource โ safe animated updates without manual index calculations
- Background URLSession โ background loading of images and data without third-party libraries
- Caching โ the cache persists when the app goes to background (disk + memory)
- Pagination โ paginated loading of news as the user scrolls
- Dark Mode โ support for light and dark themes
- Localizable โ string localization via
Localizable.strings - Tinted icon โ icon with tint color support
- async / await โ all network requests use structured concurrency
- WKWebView โ opening the full news article on cell tap
This project is distributed under the MIT license.