The Question is :
When working on iPhone7,
I get CGContextRef from UIView, then the bitsPerPixel is 64. Cause my .a can only work with traditional RGB colorspace bitmap buffer whose bitsPerPixel is 32,
Could someone know how to convert CGContextRef whose colorspace is wide color to tranditional CGContextRef just like on iPhone6 ?
The Solution is below:
add the code above to the view which you will draw on, then the CGContextRef got from the view is traditional, just as on iPhone6