Need help with UIView-Shadow-Maker?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

Seitk
127 Stars 29 Forks MIT License 5 Commits 3 Opened issues

Description

An UIView category that allow user to easily make inset shadow, customize the radius, alpha, color and directions.

Services available

!
?

Need anything else?

Contributors list

# 160,802
feature...
elastic...
Rails
ruby-on...
5 commits

UIView-Shadow-Maker

An UIView category that allow user to easily make inset shadow, customize the radius, alpha, color and directions.
Shadows are drawn with CAGradient and added into an UIView with tag, remove viewWithTag in subviews to clear the shadow.
This project is an example, category file can be found in /Shadow Maker Example/Classes

Function
- (void) makeInsetShadow;
- (void) makeInsetShadowWithRadius:(float)radius Alpha:(float)alpha;
- (void) makeInsetShadowWithRadius:(float)radius Color:(UIColor *)color Directions:(NSArray *)directions;

Example
UIView *sampleView1 = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 100)];
[sampleView1 makeInsetShadowWithRadius:3.0 Alpha:0.4];
[self.view addSubview:sampleView1];

UIView *sampleView2 = [[UIView alloc] initWithFrame:CGRectMake(150, 100, 100, 200)];
[sampleView2 makeInsetShadowWithRadius:3.0 Color:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.4] Directions:[NSArray arrayWithObjects:@"top", @"bottom", nil]];
[self.view addSubview:sampleView2];

Screenshot
ScreenShot

Contribute
I'd love to include your contributions. Feel free to improve it, send comments or suggestions. Please let me know if you have great idea on it.

Contact Me
You can add me on Facebook - http://www.facebook.com/seitkk

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.