I understood, so I will send an answer to everyone who is interested. A line stroke is drawn on each side of the form. So, in my case, I started drawing at the point (0,0) to (0,50). The left side was cropped and only the right side was painted. Change code to
path.moveToPoint(CGPoint(x: 1.0, y: 0.0)) path.addLineToPoint(CGPoint(x: 1.0, y: 50.0))
solved the problem.
source share