Have an UITableViewController with a custom cell and want to add an image "behind" it. Let me try to describe it; there is enough room for six cells to be on the screen at a time. If there is less then 6 then below the last cell the image should appear. The image should not scroll with the cells, it is designed to take up the full screen of the iphone (mean 360x470 pixels). No blank cells should appear.
In the viewDidLoad;
Then in the cellForRowAtIndexPath method;
note: red is not the final color of the cell, the background will be an image. The red is for testing (and the cell image is not done ).
The problem is that with this code the cells appear to be transparent (you can see the background image on cells that contain data), there are blank cells displayed (so for example if only 2 cell have data 4 blank cells are also displayed) and the image is not stationary it scrolls (therefore it loops and the image is not designed to loop).
FYI the numberOfRowsInSection is set with this;
thanks for the help
In the viewDidLoad;
Code:
self.navigationController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"backGround.png"]];
self.tableView.backgroundColor = [UIColor clearColor];
Then in the cellForRowAtIndexPath method;
Code:
cell.accessoryView.backgroundColor = [UIColor redColor];
note: red is not the final color of the cell, the background will be an image. The red is for testing (and the cell image is not done ).
The problem is that with this code the cells appear to be transparent (you can see the background image on cells that contain data), there are blank cells displayed (so for example if only 2 cell have data 4 blank cells are also displayed) and the image is not stationary it scrolls (therefore it loops and the image is not designed to loop).
FYI the numberOfRowsInSection is set with this;
Code:
id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo numberOfObjects];
thanks for the help