Restricting pan gesture to move to 90 degree
问题 If I have created a line for ex. shown in the figure as connecting A and B through CAShapeLayer and in that line's centre I have a UIView which has pan gesture integrated in it. How to make that UIView to move to a certain direction that creates 90 degrees to that line as shown in the figure the red line indicated the direction that the UIView can be moved? The mid-point should start moving from the centre of the line, in the direction that shown in the figure that I have updated. 回答1: I