CGContext在swift 2.3的使用
let context = UIGraphicsGetCurrentContext()
CGContextSetInterpolationQuality(context, .None)
CGContextScaleCTM(context, 1.0, -1.0)
CGContextDrawTiledImage(context, CGContextGetPathBoundingBox(context), cgImage)
CGContext在swift3.0的使用
let context = UIGraphicsGetCurrentContext()
context!.interpolationQuality = .none
context!.scaleBy(x: 1.0, y: -1.0);
context?.draw(cgImage!, in: context!.boundingBoxOfClipPath)