Skip to content

v-murygin/Test-PRIMUS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fetching and Displaying Countries in a UITableView

This section describes how to fetch a list of countries from a JSON API and display them in a UITableView. The table displays each country's name, region, code, and capital, and allows users to scroll through the entire list. Additionally, a UISearchController enables filtering by name or capital as the user types.

  1. Fetching Countries:

The code fetches a list of countries in JSON format from the following URL:

https://gist.githubusercontent.com/peymano-wmt/32dcb892b06648910ddd40406e37fdab/raw/db25946fd77c5873b0303b858e861ce724e0dcd0/countries.json

  1. Displaying Countries in a UITableView:

The countries are displayed in a UITableView, ordered by their position in the JSON data. Each table cell shows the following information using the provided format:

"name", "region" "code"
"capital"

Example:

United States of America, NA US
Washington, D.C.
Uruguay, SA UY
Montevideo

Users can scroll through the entire list to view all countries.

  1. Search Functionality:

A UISearchController is implemented to allow users to filter the list of countries by name or capital as they type each character.

  1. Implementation Details:

The implementation is robust, handling errors and edge cases. It supports Dynamic Type for accessibility. It functions correctly on both iPhone and iPad devices. It adapts to device rotation. UIKit is used for this exercise, not SwiftUI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages