Skip to content

Instantly share code, notes, and snippets.

@jaraen
Created January 17, 2012 12:31
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jaraen/1626498 to your computer and use it in GitHub Desktop.
Save jaraen/1626498 to your computer and use it in GitHub Desktop.
Shadow property in TiUIView.m
-(void)setShadow_:(id)args
{
if(args != nil)
{
self.layer.masksToBounds = NO;
if ([args objectForKey:@"shadowOffset"] != nil) {
CGPoint p = [TiUtils pointValue: [args objectForKey:@"shadowOffset"]];
CGSize shadowOffset = {p.x,p.y};
self.layer.shadowOffset = shadowOffset;
}
if ([args objectForKey:@"shadowRadius"] != nil) {
self.layer.shadowRadius = [TiUtils floatValue:[args objectForKey:@"shadowRadius"]];
}
if ([args objectForKey:@"shadowOpacity"] != nil) {
self.layer.shadowOpacity = [TiUtils floatValue:[args objectForKey:@"shadowOpacity"]];
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment