I have a custom tableview cell subclass which draws a drop shadow...

When I scroll down, some of the cells do not have their shadows drawn...

This also happens when I scroll back up.
I have tried moving the drawing code to the cell subclasses drawRect, setNeedsLayout. I have also tried this in the tableviewController's configure cell method.
self.layer.shadowRadius = 4.1f;
self.layer.shadowOpacity = 0.5;
self.layer.shadowOffset = CGSizeMake(2.1f,7.4f);
CGFloat curlFactor = 15.00f;
CGFloat shadowDepth = 4.6f;
CGSize size = self.layer.bounds.size;
UIBezierPath* path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(0.0f, 0.0f)];
[path addLineToPoint:CGPointMake(size.width, 0.0f)];
[path addLineToPoint:CGPointMake(size.width, size.height + shadowDepth)];
[path addCurveToPoint:CGPointMake(0.0f, size.height + shadowDepth)
controlPoint1:CGPointMake(size.width - curlFactor, size.height + shadowDepth - curlFactor)
controlPoint2:CGPointMake(curlFactor, size.height + shadowDepth - curlFactor)];
[self.layer setShadowPath:[path CGPath]];
Thanks in advance.