-
-
Save omorandi/1626791 to your computer and use it in GitHub Desktop.
Shadow property in TiUIView.m
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
-(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