PKCanvasView with transparent background / UIImageView overlay

Has anyone had success attempting to place a PKCanvasView in front of an image / UIImageView ?


Setting the canvas backgroundColor to clear appears to work correctly, however when finger/pencil touches down the background of the PKCanvasView reverts to black 100% alpha.


Thanks
Ben

Accepted Reply

I worked out the issue for anyone else having the same problem - you need to set isOpaque to false


canvasView = PKCanvasView()
canvasView.backgroundColor = .clear
canvasView.isOpaque = false
  • Спасибо за совет

Add a Comment

Replies

I worked out the issue for anyone else having the same problem - you need to set isOpaque to false


canvasView = PKCanvasView()
canvasView.backgroundColor = .clear
canvasView.isOpaque = false
  • Спасибо за совет

Add a Comment

Thanks so much for your code