I tried the tutorial from raywenderlich.com but the behavior was incorrect. The canvas or UIImageView
seems to move after lifting my finger.
![](https://lwgmnz.me/files/2022/02/trim.605ed3d9-ec41-4267-a251-7d652f64e0f4.gif)
It tried to run the official project from raywenderlich.com but it has the same strange behavior.
Luckily I found a solution, you need to change this line inside touchesEnded
function
// from
UIGraphicsBeginImageContext(mainImageView.frame.size)
// change to
UIGraphicsBeginImageContext(view.frame.size)
And that’s it.