user3524998 user3524998 - 2 years ago 165
Swift Question

Add Background Image to UITableView Programmingly

I am pretty new to app development. I am trying to add a background image to a table view. I am using Xcode 7.2 and swift 2.

Answer Source

Use the .backgroundView property on your tableview object and set it with whatever UIImageView you want. UITableView Apple Reference Docs

tableView.backgroundView = UIImageView(image: UIImage(named: "something.png"))

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download