I have a grouped table view and I have added a custom background view, I am setting these in code and all is well on the iOS simulator for normal and retina iPhone’s, but on the device they don’t show up at all, it’s just a cell with no background at all.
I am doing the following:
UIImageView * imageview = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellbackground.png"]] autorelease];
UIImageView * imageviewSelected = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellbackgroundSelected.png"]] autorelease];
[cell setBackgroundView:imageview];
[cell setSelectedBackgroundView:imageviewSelected];
Does anyone have a clue why this would not be working on the device ? I have deleted and reinstalled it, I cleaned the build folder and the the project but still no background.
Check the image file name. Sometimes letter case matters. In simulator “Apple.png” and “apple.png” will work. But in device it wont.