记录一下绘图里面的一些方法
2018-04-13 本文已影响7人
跬步千里_LenSky
UIGraphicsBeginImageContextWithOptions(self.size, NO, self.scale);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextAddEllipseInRect(context, CGRectZero);
//设置透明色
CGContextSetBlendMode(context, kCGBlendModeClear);
CGContextDrawPath(context, kCGPathFill);
UIImage*anewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIBezierPath *path;
CGContextAddPath(context, path.CGPath);