UITableView background showing in Interface Builder but in simulator
does anyone know why, if I add an image UIImage as background, I can c开发者_Python百科learly 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
Following a post I made, I found two possible solutions, one with UIViewController in place of UITableVIewController as discussed here:
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.
精彩评论