This project is a simple progammatically made UIKit application that shows all Formula 1 championship races and both drivers and constructors standings.
All data are retrieved form ergast.com. Here are few endpoints I used:
The entire project is based on the Model-View-Controller (MVC) architecture.
StandingsStoreandRacesStoreare responsible to store the standings and races and provide few methods to format data forViewControllersand to fetch data from the network.ViewControllerFactoryandUIViewControllerFactoryare responsible to create theUIViewControllersand inject their required dependecies.UITabBarControlleris responsible to handle the navigation between appplications tabs.StandingsViewControlleris responsible to handle theUICollectionViewand populate it with theStandingsStoredata.RacesViewControlleris responsible to handle theUITableViewand populate it with theRacessStoredata.
Both
StandingsViewControllerandRacesViewControlleruseDiffableDataSorceandNSDiffableDataSourceSnapshotto populate data inside views
The F1StatsKit include the entire application business logic in order to separate it from the ui framework. So in the future if we want to reimplement it with a different ui framework we can do it without recreating everything from scratch.
- How to display data in a
UITableViewusingUITableViewDiffableDataSource - How to handle programmatically both
UITabBarViewandUINavigationView - How to display different data types in a
UICollectionViewwithUICollectionViewCompositionalLayout
