Your UITableView may have a backgroundView. Set it as a UIImageView and set the frame for it in the frame of the table. This code has not been verified, but should give you an idea.
UIImage * img = [UIImage imageNamed:@"myImage.jpg"]; UIImageView * imgView = [[UIImageView alloc] initWithImage:img]; imgView.frame = myTableView.bounds; myTableView.backgroundView = imgView;
EDIT: The above will create a background similar to a world clock. so that it appears under other cells as a cell, change the data source:
- numberOfRowsInSection:section: should return one more than before. - tableView:canEditRowAtIndexPath: and tableView:canMoveRowAtIndexPath: should return NO for this new cell. - (UITableViewCell *)tableView:cellForRowAtIndexPath: you need to create a new cell when it is requested, so if you have 5 data cells, the sixth will be returned:
UITableViewCell * cell =
I'm not sure that you need to set the image size, but you need to set the cell size to take up the remaining space, with something like this in the delegate view of the t27> table for the last row:
//if final row return myTableView.bounds.size.height - 16.0 * myData.count; //modify from the default 16.0 as needed.
Peter DeWeese
source share