This app provides information about countries located around the World. Shows developers how to use the TableView property with classes. First, we created a class called countries. In this class, we created a model of the country's name, flag, and detailed information about the country. Then we created country objects from the class we created in the ViewController. When the user clicks on the country names in TableView, they can switch to a new page. We used an ImageView to see the flag of the country on the page that opens, a Label for the country name, and another Label for detailed information. We used the didSelectRowAt method of the TableView structure to get to this page. In this way, we have achieved a clickable structure. When the rows are clicked, the segue process is started and the information about the selected country is sent to the second page. If the sent information is successful, the user can get information about the country. In addition, we have added the ability to delete the elements in the list with the commit method of the TableView feature. In this way, the user can delete the desired data by swiping left. However, since there is no database in the application, the deletion process is done only in the area that the user sees. Deleted elements are reloaded if the application is restarted. Finally, we made readability improvements and completed the application.
muharremkoroglu / countries Goto Github PK
View Code? Open in Web Editor NEWUsing TableView with Swift Classes