Change iOS App Icons Programmatically in Xcode

Creating the code part for the user interface

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

Define the TableView in Swift and create its methods to display custom cells.

Keywords

  • table view
  • delegate custom row
  • delegate custom cell
  • swift

About this video

Author(s)
Tihomir Radev
First online
11 June 2022
DOI
https://doi.org/10.1007/978-1-4842-8598-5_3
Online ISBN
978-1-4842-8598-5
Publisher
Apress
Copyright information
© Tihomir Radev 2022

Video Transcript

Now, we can start setting up our tableView in the code. Again, we can option and click to open both files side by side. Now with control and drag, we can add our tableView reference.

Our view controller will implement UITableView delegate and UITableView data source. We’ll have an array with FruitItems. To clean the errors, we can click Fix here. And in Xcode we’ll add our tableView protocol functions.

This function contains the total count of our elements in the tableView. And it will return the count of our fruit array. This function is the main function that will display our images in the tableView.

First, we’ll define our cell. We should not forget to add the tableView delegate declaration. Our cell will take image and label from the array and display them on the screen.

In the next video, we will add all the items in the array and start that for the first time.