kevinabraham kevinabraham - 1 year ago 121
Swift Question

How to add image to table view controller

Im trying to add an image as a background behind table view controller with multiple cells,already I'm using an imageView but having an issue where the background doesn't go behind the text but above or below the cells.

enter image description here

My file structure looks like:
enter image description here

Answer Source

To set overall background image to a UITableView use below code

var backGroundImage: UIImageView = UIImageView(image: UIImage(named:  "backGroundImage.png"))
self.tableView.backgroundView = backGroundImage
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download