Created
March 14, 2011 20:20
-
-
Save tmdvs/869789 to your computer and use it in GitHub Desktop.
Using CALayers for dynamic shadows
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
UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(30, 30, 260, 260)]; | |
/* It's important to remember to pass CG structs like floats and CGColors */ | |
[[myView layer] setShadowOffset:CGSizeMake(0, 1)]; | |
[[myView layer] setShadowColor:[[UIColor darkGrayColor] CGColor]]; | |
[[myView layer] setShadowRadius:3.0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment