Skip to content

Instantly share code, notes, and snippets.

@pengpengliu
Created January 20, 2015 05:06
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 pengpengliu/262327941f0bf10d6c1b to your computer and use it in GitHub Desktop.
Save pengpengliu/262327941f0bf10d6c1b to your computer and use it in GitHub Desktop.
为View添加阴影
self.view.layer.shadowColor = [UIColor blackColor].CGColor;
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds].CGPath;
self.view.layer.shadowOpacity = 0.6f;
self.view.layer.shadowOffset = CGSizeMake(0, -1);
self.view.layer.shadowRadius = 5.0f;
self.view.layer.masksToBounds = NO;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment