views:

21

answers:

2

Hi all,

does anyone know why, if I add an image UIImage as background, I can clearly see it behind my grouped table view in Interface Builder. However when I launch the app, the background is not showing at all, both in simulator and device.

Apart from adding the image, I suppose I already did all the steps at TableView programmatic side:

self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.opaque = NO;
self.tableView.backgroundView = nil;

thanks

A: 

I am having very similar, if not same, issue. Ive lost so many hours with this... i curse the Interface Builder all the time now. Things show up (as expected) in IB, but in simulator things are totally not what I see in IB. How unacceptable is this? I really hope there is something going on in code that im over-looking.

AlvinfromDiaspar
In my case, the table view is called by a tab bar controller. In IB I created a xib with a main UIView and a UIImageView and a UITableView as subview to it. I suppose the missing background it has something to do with the fact that the main controller view is set to table view and not the UIView. If I try to change I got runtime error, telling that it cannot find the table view.
Leonardo
A: 

Following a post I made, I found two possible solutions, one with UIViewController in place of UITableVIewController as discussed here:

http://stackoverflow.com/questions/3693978/uitableview-with-fixed-image-background

with a disadvantage of header and footer problem with grouped table.

The other solution, involves writing more code and could be the case only if you have a common table that you share within different views of the apps: basically is to have a UIViewController calling a UITableViewController and attach its subview to self.view.

Leonardo