清除指定区域

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

1 // swift
2 UIGraphicsGetCurrentContext()!.clear(imageView.frame.insetBy(dx: 1,dy: 1))
1 // oc
2 CGContextClearRect(UIGraphicsGetCurrentContext(), CGRectInset(_imageView.frame, 1, 1));

 

posted @ 2017-01-02 12:54  小课桌  阅读(154)  评论(0编辑  收藏  举报