I've been trying to add a background image to my table view cells, so each cell has an image of a brand and when they click on it it'll go to another view controller to show the products of that brand.
but I've been on this for hours now and i can't figure it out heres my code:
this code worked on my other tableview (was just trying things out) and it worked only when i scanned an item to add to the tableview. but it did not show up when the app loads, which is what i need.
but I've been on this for hours now and i can't figure it out heres my code:
Code:
UIView *cellBackView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
cellBackView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"background2.png"]];
cell.backgroundView = cellBackView;
this code worked on my other tableview (was just trying things out) and it worked only when i scanned an item to add to the tableview. but it did not show up when the app loads, which is what i need.