To integrate an additional image, I utilized the XIB containing the child image, which is enclosed within a circular view to specify its position relative to the parent image. In the provided screenshot, the circular view will dynamically adjust its position alongside the parent image, while also scaling and rotating accordingly. However, the child image should be cropped to fit within the bounds of the parent image, but currently, the circular view does not adhere to the clipping boundaries of the parent image. How can I rectify this and achieve the desired functionality?
I took xib of the child image and round view into one and added that on the main image, I have applied pan, pinch and rotate gestures on to xib

Источник: https://stackoverflow.com/questions/781 ... a-in-swift