标签:ios
const CGFloat *color=CGColorGetComponents(popUpColor.CGColor); UIGraphicsBeginImageContext(CGSizeMake(30, 20)); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(ctx, color[0], color[1], color[2], 1); CGContextSetShadowWithColor(ctx, CGSizeMake(0, 0), 7.0, [UIColor blackColor].CGColor); CGPoint points[3] = { CGPointMake(15, 20), CGPointMake(25, 0), CGPointMake(5,0)}; CGContextAddLines(ctx, points, 3); CGContextClosePath(ctx); CGContextFillPath(ctx); UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
标签:ios
原文地址:http://blog.csdn.net/rainlesvio/article/details/38874319