Created
April 5, 2012 12:21
-
-
Save florieger/2310609 to your computer and use it in GitHub Desktop.
UIView shadow
This file contains hidden or 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
#import <QuartzCore/QuartzCore.h> | |
self.view.layer.masksToBounds = NO; | |
self.view.layer.shadowColor = [[UIColor blackColor] CGColor]; | |
// Offset to bottom, left | |
self.view.layer.shadowOffset = CGSizeMake(-1,1); | |
self.view.layer.shadowRadius = 10; | |
self.view.layer.shadowOpacity = 1; | |
// Set shadow path property to improve performance when animating the view | |
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.bounds].CGPath; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment