Skip to content

Latest commit

 

History

History
50 lines (25 loc) · 2.36 KB

README.md

File metadata and controls

50 lines (25 loc) · 2.36 KB

Countries App

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.

Home screen

Simulator Screen Shot - iPhone8 - 2022-10-08 at 11 43 16

  • 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.

Saved screen

Simulator Screen Shot - iPhone8 - 2022-10-08 at 11 43 23

  • 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.

Details screen

Simulator Screen Shot - iPhone8 - 2022-10-07 at 22 03 32 Simulator Screen Shot - iPhone8 - 2022-10-07 at 22 03 53

  • 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.

Simulator Screen Shot - iPhone8 - 2022-10-07 at 22 04 58