An iOS application generating random quotes from different quote categories
All quotes are within your pocket with Quotify.
Quotify. is an iOS application that generates random quotes from different categories. It shows you a quote from a category you have chosen and you can generate new ones with “Quote it” button.
Firstly, when application opens, an onboarding view is shown that is showing name of the project and a Get Started slider. After onboarding view, categories are listed to user for generating quotes, user will choose a category and a quote will show up randomly.
Quotes are generated from https://api.api-ninjas.com/v1/quotes?category={your-category} and it is fetched using URLSession. After fetch, using JSONDecoder, it is decoded to format of Quotes model and stored in an array of Quotes format.
After fetch, using List, quote and author are shown to user, if user wants to generate another random quote, it can press “Quote it” button and generate a new one with the same category, or go back to categories view and select a new category for different quote.
This project aimed to make a fetch request to an API using URLSession and decoding a JSON using JSONDecoder.
IMPORTANT NOTE
If you clone this project, you must change “YOUR_API_KEY” part with the api key you get from api-ninjas in order to work properly.
request.setValue("YOUR_API_KEY", forHTTPHeaderField: "X-Api-Key")
Images
For full implementation
Screen.Recording.2022-12-01.at.16.55.53.mov
This project is an updated version of QuoteATolstoy project. (For QuoteATolstoy, you can check it’s repository for details: https://github.com/ArdiJorganxhi/QuoteATolstoy)