Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Add Margins To UITableVIew

I read the article about add margins to UIViewTable, but the code is Object-C, and I want the example in Swift. I want create a UIViewTable like this:

enter image description here

Someone can help me?


1 Answers

You can use the table view as you would normally use and just add a UIView in the tableView cell and apply constraints to it as i have attached in the image. And you can then add all your controls within the UIView , Also set the background colour of the tableview and table view cell to clear colour.

enter image description here

and you would get this output

enter image description here

Thanks

like image 147
Omkar Guhilot Avatar answered Dec 30 '25 23:12

Omkar Guhilot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!