This is an application where we can view various countries, access their details and save the country we want.
- I developed the application with Swift language and MVC architecture.
- I used Storyboard and UIKit for design.
- I used RapidAPI GeoDB Cities for data.
- After parsing the data with JSONDecoder, I placed it in Collection View.
- At the bottom of the page is the Tab Bar Controller, where we can switch between the home screen and the saved screen.
On the home screen, we can see the names of the first 10 countries in the API I used. We can also save or delete countries by clicking the "star" button on the right of the cells. By clicking on the desired country, we can access its details.
- I used UserDefaults to save the countries and not to lose the ones we save when we close the application.
We can perform all the operations that we can do on the home screen, also on the saved screen.
- I used the Navigation Controller to switch to the detail page.
- I sent a request to the API again with the "code" of the country we clicked on and I have accessed its details.
On this page, we see the name of the country we clicked on in the title, its flag and country code below it. In the same way, we can save or delete countries clicking the "star" button in the upper right corner.
- When the "for more information" button is clicked, I used the country's "wikiDataId" to be redirected to the wikidata page via Safari.