Rounded UIView with Shadow?
问题 So using this link: How do I draw a shadow under a UIView? And this link: http://iphonedevelopment.blogspot.com/2008/11/creating-transparent-uiviews-rounded.html I came upon this implementation: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextSetShadow(context, CGSizeMake(-15.0f, 20.0f), 5.0f); CGContextSetLineWidth(context, strokeWidth); CGContextSetStrokeColorWithColor(context, self.strokeColor.CGColor);