Created
March 27, 2012 06:10
-
-
Save nacho4d/2213175 to your computer and use it in GitHub Desktop.
Adds a drop shadow effect to the view
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 drop shadow to the view | |
#import <QuartzCore/QuartzCore.h> | |
@interface UIView (WMAdditions) | |
- (void)addDropShadow; | |
@end | |
@implementation UIView (Dropshadow) | |
- (void)addDropShadow | |
{ | |
// Below 4 properties show the drop shadow | |
self.layer.shadowOpacity = 1.0; | |
self.layer.shadowRadius = 0.0; | |
self.layer.shadowColor = [UIColor blackColor].CGColor; | |
self.layer.shadowOffset = CGSizeMake(0, -1); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment