UITableView background customization strange behavior
- by Omer
Hi,
There is a couple of hours that I'm trying to set a tableView background image.
My controller is a subclass of UITableViewController, and I simply wrote this lines
of code in ViewDidLoad method.
UIImage *image = [UIImage imageNamed:@"home-portrait-iphone.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
self.tableView.backgroundView = imageView;
Everything looks great on the simulator, I mean, I see my table and as background view, y can see the image. But when the app is running on the device (ipod touch), I get this error:
Program received signal: “SIGABRT”.
and the stack says:
* -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '** -[UITableView setBackgroundView:]: unrecognized selector sent to instance 0x812e00'
and the exception is thrown in the assignment, a mean this line:
self.tableView.backgroundView = imageView;
any ideas?
Thank you in advance.