GitHub Followers is a project based on Sean Allen's Take Home Project course. The DogHub module (haven't had a lot of time to think about the name, have I?) is my very own creation, built upon the base project.
Let's discuss both modules!
GitHub Followers is essentially a GitHub followers browser app. By entering a username in the search controller, we download their data from GitHub API which include:
- user's login
- user's repos
- user's gists
- user's date of GitHub account creation
- and many other entities, among which are the user's followers - the main point of this app!
Once the followers are downloaded from the API, they are presented in a collection view with a diffable data source - it makes for nice animations when using the search controller inside the followers list. Tapping on a follower shows a modal view controller, revealing more info about them. It's also possible to add a user to favorites and access them any time.
The DogHub module is an extension of the app - apart from fancy animations in the home view controller, it populates the collection view images with... dogs.
Once the followers are downloaded and the Dog Mode is enabled, another network call - this time to Dog API - gets the same number of random images of dogs and then the followers' avatar URLs are swapped with the dog image URLs. To see the true GitHub avatar of a user, you have to enter their profile by tapping their cell in the collection view.
Among many things I learnt/trained during this project, here are the most important ones for me:
- writing UI programmatically
- creating network calls in native Swift
- using multiple APIs in one app
- MVC design pattern
- using delegates and protocols
- using diffable data source in a collection view
- managing persisting objects in UserDefaults with a possibility of their removal
- implementation of Dynamic Type
- Dark Mode support
- implementation of child view controllers
- constrained views animation
- creating a CAEmitterLayer with a finite animation
No big deal here really, just open the project in Xcode 12.
See LICENSE
for information.