The Shortcutter's Coding Challenge
You can see the task here: Code challenge
Client wants to create a comic viewer app based on these comics.
For MVP I chose features:
- View comics: current comics, previous and next comics, comics by the comic number;
- Save comics to favourites and remove comics from favorites if necessary;
- View an explanation of the comic and view additional information about this comics on the website (from main screen and favourite screen);
- View information about license (this is a mandatory requirement of the author for permission to publish).
App icon, launch screen and main screen.
The main screen displays the latest published comic. The reference was the main page of the website – show comics not as a feed, but one by one.
You can look at the previous/next comics or randomly, you can also find a specific comic by number if you know it. Keyboard is only numeric. And if you enter a comic number greater than it is, you will be warned about this. And you can't watch the previous comic before the first comic, of course.
Tap on the question icon briefly explains the comic. You can also see more information about this comic on the wiki by clicking on the "Show more" button. You can add current comic to favourite comics and see more info too. Favorite comics are added to the feed. You can remove the comic from your favorites any time.
And another important thing is the license. We are free to copy and reuse any of author's drawings (noncommercially) as long as we tell people where they're from.
- MVC pattern that makes it easy to add and extend features;
- Coding without storyboard, NSLayoutConstraint for screen layout;
- Added custom buttons to fast implementation;
- Singleton ComicsStore to easy interaction;
- Codable type and Equatable type to JSONDecoder. Using DispatchQueue.main.async in decoder to prevent error "must be used from main thread only";
- UITableViewDelegate to favourite comics feed;
- ComicsTableViewCellDelegate to reload TableView when a comic is removed from the favorites list;
- Extensions are written in separate files to quickly implement settings (including alerts).