Skip to content
Il ho Ahn edited this page Aug 27, 2013 · 3 revisions

##Summary Make UIView Layer by One line code. For drop shadow, gradient, etc...

##Drop Shadows

####+ (void) dropShadow:(UIView ) view Opacity:(float)opacity andOffset:(CGSize) offset andColor:(UIColor) color

  • (void) dropShadow:(UIView *) view Opacity:(float)opacity andOffset:(CGSize) offset

Drop shadows

Fill vertical gradient

####+ (void) gradient:(UIView *) view start:(UIColor )startColor endColor:(UIColor) endColor ####+ (void) gradient:(UIView ) view colors:(NSArray)colorArray

Fill vertical gradient.

colorArray: UIColor array

NSArray *colors = [NSArray alloc] initWithObjects:[UIColor colorWithRed:0.51 green:0.84 blue:0.40 alpha:1.0],
                                                  [UIColor colorWithRed:0.51 green:0.84 blue:0.40 alpha:0.0],
                                                  nil];
[UIViewLayerUtil gradient:self.backgroundView colors:colors];                                                

##Make border

####+ (void) border:(UIView*) view size:(float) size andColor:(UIColor*) color ####+ (void) border:(UIView*) view size:(float) size andColor:(UIColor*) color andRadius:(float) radius

Make border

Clone this wiki locally