I am getting unsupported parameter combination CGBitmap error with swift

前端 未结 8 584
野趣味
野趣味 2020-12-09 08:16

I am trying to create a CGContext in swift. It compiles but throws an error at runtime.

let colorSpace:CGColorSpace = CGColorSpaceCreateDeviceRGB()
let conte         


        
8条回答
  •  渐次进展
    2020-12-09 08:46

    CGBitmapInfo.AlphaInfoMask is not a valid bitmap info.

    Try setting CGBitmapInfo.AlphaLast or CGBitmapInfo.AlphaFirst.

提交回复
热议问题