Swift UITableView Tutorial with Custom Cells - Beginner Series

Sean Allen · 192K views · 2017 · 26:35

Open on YouTube

Software (other)Education & learningtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when beginners need to build a table view with custom cells, and askers often cite it as the tutorial they were following when they hit an error.

Recommended by 1 people across 1 different months, 2018 to 2019.

What it is

A 26-minute beginner tutorial from Sean Allen's Swift series on building a UITableView with custom cells in Xcode. It walks through the setup, a custom UITableViewCell with an image, and the delegate and data source methods, with downloadable source code updated for Swift 4.2.

What people said

Recommends FRIDDAY · 2019-02 · Stack Overflow · on “swift insert/delete row that redirect to a new page”

by using UItableView you can have rows. UItableView has delegate method tableView didSelectRowAt . In the method you can handle page transitions when a row is selected. Some useful links for how to create UItableView UITableView – Tutorial [LINK] UITableView Tutorial with Custom Cells [this video]

Cites Jaya Mayu · 2018-09 · Stack Overflow · on “Swift getting Images from Core data to Table View”

Before starting the answer, I hope you have a custom cell defined by inheriting from UITableViewCell which includes an UIImageView. If not, you should do it first [this video] . SDWebImage [LINK] is the most popular library for this kind of work. If you could use third-party library go ahead with it and use it. Here is a sample code for a Cell where you would display an ImageView over the network. override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: cellId, for: indexPath) as! DeliveryCell //make url from the string by extrating the url from Core Data entity let imageUrl = URL(string: ima

Cites Soltra45 · 2019-10 · Stack Overflow · on “Error: superview: unrecognized selector sent to instance when setting tableView.delegate and tableView.datasource equal to self”

The error: -[Handsome_Fuel.AddVehicle superview]: unrecognized selector sent to instance 0x7fcb55c1dc30 Here is the full error message: 2019-10-29 15:46:55.442464-0400 Handsome Fuel[8417:104074] -[Handsome_Fuel.AddVehicle superview]: unrecognized selector sent to instance 0x7f9f5bd33440 2019-10-29 15:46:55.449755-0400 Handsome Fuel[8417:104074] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Handsome_Fuel.AddVehicle superview]: unrecognized selector sent to instance 0x7f9f5bd33440' *** First throw call stack: ( 0 CoreFoundation 0x00007fff23baa1ee __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50864b20 objc_exception_throw + 48 2 CoreFoundation

Cites RussellHarrower · 2019-11 · Stack Overflow · on “swift immutable expression”

I am getting the following error and I am unsure how to solve this. Cannot assign to immutable expression of type '[News].Type' my code. I was following the following video [this video] The only difference is No image in my cell. The line in question is var tempNews = [News] = [] // // NewsViewController.swift // DRN1 // // Created by Russell Harrower on 26/11/19. // Copyright © 2019 Russell Harrower. All rights reserved. // import UIKit class NewsViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var news: [News] = [] override func viewDidLoad() { super.viewDidLoad() news = createArray() // Do any additional setup after loading the view. tableView.delegate = self table