Swift iOS
xcode 7.1 Beta
I am trying to set background image on the PFQueryTableViewController
. I tried dragging the table from the story board (Ref. outlet: tableView) but I am not able to make the code work referring to that outlet.
let image = UIImage(named: "Background")
tableView.backgroundView = UIImageView(image: image)
The app crashes stating:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:
.
I even tried setting the background color tableView.backgroundColor = UIColor.greenColor()
But again, the app crashes
Can someone explain what's going on in here? I searched online, but most of the posts are only related to fetching images inside the PFQueryTableViewController cell.