Draw a shadow to One View iOS objective C
Solution:
Draw a shadow under a view in iOS.
Code:
Draw a shadow under a view in iOS.
Code:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextSetShadow(context, CGSizeMake(-14, 20), 5);
[self.view drawRect: rect];
CGContextRestoreGState(context);
}
Comments
Post a Comment