Created
December 21, 2015 15:22
-
-
Save phynet/72beac10937d3a29ce5e to your computer and use it in GitHub Desktop.
Create a shadow under a uiview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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