How do I add a radial gradient to a UIView?
问题 I have a UIView which I want to have a radial gradient, and I'm wondering how to go about doing this? 回答1: To do this you need to drop down to Core Graphics and use CGContextDrawRadialGradient. Similar Stack Overflow Questions How can I draw a sector with radial gradient (iphone) How to draw a gradient line (fading in/out) with Core Graphics/iPhone? Other Resources There's a tutorial showing how to draw icons with gradients on iOS here: http://redartisan.com/2011/05/13/porting-iconapp-core