CGContextSetFillColorWithColor: invalid context 0x0

后端 未结 1 1388
孤街浪徒
孤街浪徒 2020-12-09 16:48

CGContextSetFillColorWithColor: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributin

1条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 17:31

    Your image.size isn't valid, so UIGraphicsBeginImageContextWithOptions isn't creating a graphics context. Both image.size.width and image.size.height must be positive, finite numbers.

    Possibly image itself is nil. When you send the size message to nil, you get back CGSizeZero.

    0 讨论(0)
提交回复
热议问题