Skip to content

Instantly share code, notes, and snippets.

@phynet
Created December 21, 2015 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phynet/72beac10937d3a29ce5e to your computer and use it in GitHub Desktop.
Save phynet/72beac10937d3a29ce5e to your computer and use it in GitHub Desktop.
Create a shadow under a uiview
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:self.menuView.bounds];
self.menuView.layer.masksToBounds = NO;
self.menuView.layer.shadowColor = [UIColor blackColor].CGColor;
self.menuView.layer.shadowOffset = CGSizeMake(0.0f, 0.5f);
self.menuView.layer.shadowOpacity = 0.75f;
self.menuView.layer.shadowPath = shadowPath.CGPath;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment