Skip to content

Instantly share code, notes, and snippets.

@brennanMKE
Created July 16, 2014 23:08
Show Gist options
  • Save brennanMKE/7bf512379dcccb9f50cd to your computer and use it in GitHub Desktop.
Save brennanMKE/7bf512379dcccb9f50cd to your computer and use it in GitHub Desktop.
iOS Shadow View
// add a shadow
UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRect:view.bounds];
view.layer.masksToBounds = NO;
view.layer.shadowColor = [UIColor blackColor].CGColor;
view.layer.shadowOffset = CGSizeMake(0.0f, 5.0f);
view.layer.shadowOpacity = 0.45f;
view.layer.shadowRadius = 10.0f;
view.layer.shadowPath = shadowPath.CGPath;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment