[[view layer] setShadowOffset:CGSizeZero];
[view setBackgroundColor:[UIColor whiteColor]];
[[view layer] setShadowOpacity:1];
[[view layer] setShadowRadius:3];
[[view layer] setShadowColor:[[UIColor blackColor] CGColor]];
[[view layer] setShadowPath:[[UIBezierPath bezierPathWithRect:[view bounds]] CGPath]];
[[view layer] setShouldRasterize:YES];

Gist:

 

Advertisements