Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the background of a UITableView to an image?

Tags:

iphone

I am using a UITableViewController which uploads a table. I have a Nib File with UITableView in it.Now I want to set the background of the tableView either from interface builder or from the TableViewController to an image.

How to do that.

OK so I created an UIImage in my controller. Now when I add where do I need to add it.

When I try adding it and set the color of tableView to clearColor, it just shows me the Image and not the table although I make sure that image is being sent to back of all views.

Guys Please note that I am not dealing a UIView and adding a tableView as its subview But I am dealing with a UITableView .

like image 377
rkb Avatar asked Dec 17 '22 05:12

rkb


1 Answers

Place a UIImageView behind the UITableView, then do this:

tableView.backgroundColor = [UIColor clearColor];
like image 123
Chris Newman Avatar answered Dec 31 '22 07:12

Chris Newman