I'm currently working on an iOS project where I'm facing an issue related to maintaining a vertical offset from a touchpoint even after the view has been rotated.
let point = CGPoint(x: touchpoint.x, y: touchpoint.y - CGFloat(self.setOffset))
However, the current result I'm getting doesn't match my expectations. Here's an image illustrating the issue:
Screenshot-

I have also added an inverted rotation to a green shape using CAShapeLayer. While I've managed to apply the rotation to the shape, I'm struggling to figure out how to adjust the touchpoint's position to maintain the desired offset even after rotation.