This app build on using Xcode version 11.2.1 , Swift 5 and iOS version 12.4 .
To run this app, open terminal and clone this app by using below command
git clone https://github.com/SreekanthGudisi/GitHubUserAndFollowers.git
Open the project and run on simulator or actual divice,
-
Serach by Github account username if username not found you will get an Alert.
-
If your name found it will go to Details ViewController. In Details Screen you can see Username, Email And Avatar.
-
If user has followers, Here I have given condition to show list of followers.
a) The conditon is: GitHub user has more than 100 repos and 100 followers, then only Im showing the follower details (like Name and Avatar).
b) The API is : https://api.github.com/search/users?q=\(userName)+repos:>100+followers:>100 . So in serach screen, type tom as userName.
Used Design Patterns like :
-
SingleTon Design Pattern
By storing API's response into SharedInformation class
-
Decorator Design Pattern.
By using Extension
-
TableView Delegate Design Pattern
By using heightForRowAt method
-
TextField Delegate Design Pattern
By using textFieldShouldReturn method
Cache system for all the images :
I have stroed all images into Cache Dictionary from API call. Once API is calling, at that time all images will save into Cache Dictionary. So next time onwords showing images from Cache Dictionary.
Lazy loading :
Doing lazy loading for reduce the memory management.
Look at Video and Screen shots from Image folder