Hi everyone
I have a static table view. I want to set the background using the instance property of UITableView. I've added a subclass of UITableViewController and set the class. I've added the following code:
For some reason I cannot see the table view any longer. What am I doing wrong?
Thanks for your answer
I have a static table view. I want to set the background using the instance property of UITableView. I've added a subclass of UITableViewController and set the class. I've added the following code:
Code:
override func viewDidLoad() {
super.viewDidLoad()
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem
let imageView = UIImageView(image: imageLiteral(resourceName: "key "))
imageView.contentMode = .right
imageView.alpha = 0.2
// imageView.frame = tableView.frame
// view.backgroundColor = UIColor(patternImage: #imageLiteral(resourceName: "key "))
tableView.backgroundView = imageView
}
For some reason I cannot see the table view any longer. What am I doing wrong?
Thanks for your answer
Last edited: