Member-only story
UITableViewCell with Round Corners and Shadows in Swift 5
This is a tutorial to add both Round Corners and shadow in UITableViewCell using swift 5.
You can find also the full tutorial in pdf in this link:
The best way to do that is to use 2 different layers for the corner radius and the shadows. Let’s start setting the shadow in a cell.
First we need to create an Extension of UIView in order to apply our shadow in every view.

We wrote the applyShadow function which takes a cornerRadius to set in the layer and the properties of the shadow. You can play the shadowColor, shadowRadiues and shadowOpacity to design your shadow as you wish.
Now let’s create a base UITableViewCell that we need for every cell we are creating in our app.

Using the code above we say at the cell to applyShadow with corner radius 8 in it’s root view. Now let’s create our…