I've a plain UITableView (not grouped) that I want to add a dropshadow to left and to the right.
How can I achieve this? I've tried:
[self.tableView.layer setShadowColor:[[UIColor whiteColor] CGColor]];
[self.tableView.layer setShadowOffset:CGSizeMake(0, 0)];
[self.tableView.layer setShadowRadius:5.0];
[self.tableView.layer setShadowOpacity:1];
but it doesn't work.
You need to make sure clipsToBounds
and masksToBounds
are set to NO
on the view and layer respectively.
self.tableView.clipsToBounds = NO;
self.tableView.layer.masksToBounds = NO;