清除指定区域

核心绘图 - 清除指定区域的函数 - 注意:视图背影颜色要为clearColor,否则清除之后为黑色

1 // swift
2 UIGraphicsGetCurrentContext()!.clear(imageView.frame.insetBy(dx: 1,dy: 1))
1 // oc
2 CGContextClearRect(UIGraphicsGetCurrentContext(), CGRectInset(_imageView.frame, 1, 1));
原文地址:https://www.cnblogs.com/panda1024/p/6242303.html