Reputation: 11
I have added an imageview on top of tableview. I need to set it to the back of tableview without setting it as a background on tableview.
sendSubviewToBack:bgView
also does not work. Can someone help?
Upvotes: 0
Views: 97
Reputation: 8460
try like this ,
if objects are in xib ,then take imageview infront of tableview in xib,
(or)
if you are adding in programatically then add imageview before adding the tableview
(or)
table.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@""]];
(or)
[table bringSubviewToFront:yourImageview];
Upvotes: 1
Reputation: 1318
Not getting what exactly you want . One another way from XIB , just simply add it into the xib behind your table View , and set your tableView's background colour as clearcolor, So you'll be able to see the image behind your tableview.
Upvotes: 0
Reputation: 11276
Try this
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"table_bg_image.png"]];
Upvotes: 0