Member-only story
Use Inset for UITableViewCell
Insert that inset
Before we start
Let’s take a look.
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 14.2 and Swift 5.7.2
Prerequisites
It would be useful to know something about UITableView
Keywords and Terminology
ViewController: Sits between the view and the model, tying them together (usually using the delegate pattern). The controller is not tightly bound to a concrete view, and communicates via a protocol to an abstraction. An example of this is the way that a UITableView communicates with its data source through the UITableViewDataSource protocol. Think of it as the how of the App. The primary job of the controller is to format the data from the model for the view to display.
UITableView: A view that presents data using rows arranged in a single column
Where to set
The view controller is responsible for managing data and configuring cells. The cell is responsible for displaying content and handling it’s own appearance.
This means that we are going to set the insets for any particular UITableViewCell
instances…