Skip to content

Instantly share code, notes, and snippets.

@aspitz
Created October 17, 2013 20:21
Show Gist options
  • Save aspitz/7031587 to your computer and use it in GitHub Desktop.
Save aspitz/7031587 to your computer and use it in GitHub Desktop.
Code to add a shadow to a UIView. This code assumes that it's being added/executed inside a UIView or subclass of UIView
self.layer.masksToBounds = NO;
self.layer.shadowOffset = CGSizeMake(2.5, 5);
self.layer.shadowRadius = 5;
self.layer.shadowOpacity = 0.5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment