I have a topView on top of a UITableViewCell whose height I increase first, then I'm drawing and removing a shadow to topView with these 2 methods:
- (void)drawShadow
{
[topView.layer setShadowColor:[UIColor blackColor].CGColor];
[topView.layer setShadowRadius:3.0];
[topView.layer setShadowOffset:CGSizeMake(0, 4)];
[topView.layer setShadowOpacity:0.3];
[self bringSubviewToFront:topView];
}
- (void)removeShadow
{
[topView.layer setShadowColor:nil];
[topView.layer setShadowRadius:0.0];
[topView.layer setShadowOffset:CGSizeMake(0, 0)];
[topView.layer setShadowOpacity:0.0];
}
However after shrinking the UITableViewCell back and calling removeShadow, the separator line between each table cell is gone. What's the best way to make it come back?