In portrait mode (first time)

After turning to the landscape, why are the old forms:

I use UIBezierPath
and CAShapeLayer
to draw circles and lines in a custom UIView
layer. The problem is that we can successfully create new circles and lines after turning the device, I canβt delete the old shapes. The new shapes created after rotating the device are perfect, I just need to remove from the screen those old shapes that stick together on the screen. Images are attached.
source share