How to create custom table view cell look like this?

Can anyone please give me any suggestions, how do i create custom table view cell look like this programmatically with UIKit.

text shown in image("Share Across Devices") might be too long, so accordingly white view should adjust the height. Needs to apply constraints accordingly.

You can create a custom nib for this cell and register it to the TableView.

There,

  • Have an horizontal stack for text and UISwitch
  • the label will be multiline (0 line in IB)

This is not really a custom layout but natively supported. You can use a content configuration with a single label and place a UISwitch in the cell's accessory view.

How to create custom table view cell look like this?
 
 
Q