Member-only story

Understanding Swift’s IndexPath

That is, so it works

Steven Curtis
4 min readApr 17, 2023
Photo by Denny Müller on Unsplash

Before we start

Difficulty: Beginner | Easy | Normal | Challenging

This article has been developed using Xcode 12.2, and Swift 5.3

Prerequisites

* You will be expected to be aware how to either make a Single View Application in Swift or use a Playground

* You can follow along with this article, but it would be useful to have some knowledge of the UITableView

Keywords and Terminology

IndexPath: The path to a specific node in a tree of nested array collections

Row: The content in a UITableview is ordered into rows

Section: A grouping of rows in a UITableView

UICollectionView: An object that manages an ordered collection of data items and presents them using customizable layouts

UITableView: A view that presents data using rows arranged in a single column

This project

Warning!

Please not that this isn’t a production-ready implementation of a UITableView; the architecture is all over the place meaning I’ve just whacked some String instances into a table. My…

--

--

No responses yet