How to add a custom UITableViewCell Swift

by Arnold Burian

Check out How to add a custom UITableViewCell Swift by JR. Here is an excerpt:

Create a new UITableViewCell in Swift (with nib)

Screen Shot 2018-06-24 at 7.56.16 AM.png

Give it a unique identifier

Screen Shot 2018-06-24 at 7.57.14 AM.png

Load it up in your ViewController

Screen Shot 2018-06-24 at 7.58.01 AM.png

Then access it in your UITableView delegate methods like this

Screen Shot 2018-06-24 at 8.02.41 AM.png

Screen Shot 2018-06-24 at 8.02.47 AM.png

Give your cell a default height in the ViewController else you will get a warning

Screen Shot 2018-06-24 at 8.15.48 AM.png

The full article is available here.

You may also like

This website uses cookies to improve your experience. Accept Read More