Last active
December 13, 2015 23:09
-
-
Save inailuy/4990006 to your computer and use it in GitHub Desktop.
making a shadow for a view in iOS
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
//Adds a shadow to sampleView | |
CALayer *layer = self.sampleView.layer; | |
layer.shadowOffset = CGSizeMake(1, 1); | |
layer.shadowColor = [[UIColor blackColor] CGColor]; | |
layer.shadowRadius = 4.0f; | |
layer.shadowOpacity = 0.80f; | |
layer.shadowPath = [[UIBezierPath bezierPathWithRect:layer.bounds] CGPath]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment