I have a grouped tableview where I have one row in each section. I am setting the backgroundview of the cell to my custom image and I wish the row is rendered this way:
But it renders like this (notice the absence of shadows, it's flat):
Here's the code in cellforRowAtIndexPath:
((UIImageView *)cell.backgroundView).image = [UIImage imageNamed:@"BGImage"];
Where BGImage is the first image in this post, with shadows. What am I missing here?
UITableViewCell
.you have to set Your Cell Background using bellow Delegate Method of UITableView:-
at your issue may be your image
Height
width
and your cellheight
width
not sameI am using above method in my project set with bellow shaded image set in Cell:-
and its look like in project :-