Swift UITableView Tutorial with Custom Cells – Beginner Series

**Source code updated for Swift 4.2**

In the latest installment of my Swift Beginner Series, we’ll discuss UITableView and custom UITableView Cells in Swift using Xcode. UITableViews are a fundamental part of iOS Development and knowing them well is invaluable. You will build these all the time in your iOS development career.

If you’re just starting out learning Swift, go ahead and subscribe. More Beginner videos are on the way!

Thumbnail Images to use in TableView:

Source Code:

Swift News can now be heard on my Podcast:

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Paul Hudson’s Hacking With Swift:

Learn Advanced Swift Here:

Links to my Developer & YouTube Setup

Personal Links:





My inbox gets flooded with questions. If you want a guaranteed response, use this link:


Victor Fernandez says:

Hello Sir, Currently, I’m learning swift and your videos have been really helpful.
the videos are clear, most important, they are always to the point.
Thank you, Sir.

Alcatic Muirhead says:

yo big up from Jamaica yo
ur vids help alot !
Nuff Respect!

Logan Stanfield says:

Great tutorial. Thanks!

Adil again with feeling... says:

Excellent explanation.

Pavel Dubinin says:

Great content, thanks. I especially enjoyed how you found time to structure your code nicely even though it was not necessary for the demo purposes.

Linus Karlsson says:

Hi Sean,

Great video as always!

First when I followed your tutorial it worked like a clock, however today when I tried redoing it for practice, one weird error came up:

let video1 = Video(image: beginner-first-app, title: “Your First App”)
ERROR: Use of unresolved identifier ‘app’, Use of unresolved identifier ‘beginner’, Use of unresolved identifier ‘first’.

It’s doing this on all six of my “let video1 = …”-list

Any thoughts? I’m using Xcode Version 10.0 (10A255)

Евгения Галецкая says:

If I don’t have an initial array of objects, that I want to put into my table, but want to create a new cell each time a new object is appended to the array, when a “send” button is pressed, how can I update my table?

Duncan Wallace says:

You dude, are the man. Very articulate and the best part is that as you are coding you are describing not only what you are doing, but the purpose of the different programming constructs as you type. Superb!!! Four Stars:-)

Zippy Toad says:

Thanks for this.

Reza1127 says:

what if we have so many static data?
for example 12 items in first view and each item shows 180 labels in second view that contain tableView to show them.
I don’t think that in this situation we can use ur way in appending data to our table.
In this situation I used so many arrays and my app works great.
is there any way instead of ur way and my way(so many arrays) to implement our static data to the tableView?

sycoi001 says:

You are god bro! Thank you!

Med Amine Souaiaia says:

thank you ! great tutorial ! I love your work.. keep on

Matheus Anzzulin says:

Great tutorial, thanks!

Student Programmer says:

this something am still struggling with as a developer. that is writing dataModel, and the reason is I really don’t know what, when and why they are needed for. why did you approach creating a custom table view cell through this method of creating a dataModel instead when you could have just use a global Array( populating it with the images and strings). I appreciate it if you could elaborate on DataModel.

cabyambo says:

Great video! Why do you have to cast it “as a video cell” at the timestamp 20:30 ?

Ibraheem Assiri says:

ُThanks Allen.

thupten tsundue says:

at 1:00 how did you created that coca file …. you said someting like comment type …..but not working

Steven says:

How do you do this for videos? The UIImageView wont accept any video files?

leumasdiderot says:


Jonathan Azuri says:

More beginners videos please.. ?

Reza1127 says:

When I reach to 15:44 of this tutorial,the images that I added to the assets doesn’t called by the initializer in Swift 4
so i downloaded ur source code and there is the same,ur images in the assets doesn’t call by UIImage !!!
is swift 4 different !?

Jasper Reddin says:

Just curious, why do you put the implementation of data source and delegate in an extension of video list screen? Why not put it with the video list screen class?

Salman Zafar says:

One of the best iOS tutorial I have seen so fare … Thanks Sean

Mateo Bello Gularte says:

hey man, love your tutorials.

I’m trying to connect the table view cells so they can read data from firebase, but I don’t know how to approach it.

What would be your general approach? I’ll learn the individual steps.


Cole McKenna says:

Hey Sean – fantastic video and I got my first bit of app up and running! In this video you mentioned that you have to have a navigation controller if you want to be able to click into any of the TableViewCells. Do you happen to have a video or could you point me to a resource that shows how to build that second view and make the cells “clickable”?

justaaq says:

Great tutorial . fast paced,detailed and to the point !

cabyambo says:

How would I begin to implement a sort and filter function for the cells in the table view?

eFePeMK says:

Hi Sean! Another great tutorial.. btw I’m wondering what’s the difference between making a function “createArray” and then calling it instead of just declaring the array? it’s just neat or I’m missing some fundamental here?

Omar. R says:

Why sometime create cocoa touch class and sometime create swift file , thanks

HD4WG says:

this is outdated.

Shubham Tomar says:

can i get iTunes link for these series or any download link since youtube is blocked in my office

JacksMacintosh says:

Wooaaahhhhh beardless Sean

MR YUP says:

How did you make your swift files black background instead of white when coding? it seems cool!


love your videos

Ermal T. says:

Great content Sean. Definitely like your style of teaching.
I would love to see a video where you create a custom UITableView class, and write the logic for the table view inside of that class, just like you do with the UITableViewCell on this video.
So once you insert the tableview in the storyboard and from the property panel, with the tableview selected you add your custom UITableView class and that’s it, you create a tableview outlet in the view controller and just pass is an array of videos and the UITableView class knows what to do with the data. I hope this makes sense.

Thanks for posting great content.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!