user3524998 user3524998 - 5 months ago 49
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

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"))