UIImageView rotation animation in the touched direction
===

I have one UIImageView having an image of an arrow. When user taps on the UIView this arrow should point to the direction of the tap maintaing its position it should just change the transform. I have implemented following code. But it not working as expected.

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

     UITouch *touch=[[event allTouches]anyObject];
     touchedPoint= [touch locationInView:touch.view];
     imageViews.transform = CGAffineTransformMakeRotation(DEGREES_TO_RADIANS(rangle11));
     previousTouchedPoint = touchedPoint ;
    }

    - (CGFloat) pointPairToBearingDegrees:(CGPoint)startingPoint secondPoint:(CGPoint) endingPoint
    {
   
     CGPoint originPoint = CGPointMake(endingPoint.x - startingPoint.x, endingPoint.y - startingPoint.y); // get origin point to origin by subtracting end from start
       float bearingRadians = atan2f(originPoint.y, originPoint.x); // get bearing in radians
    float bearingDegrees = bearingRadians * (180.0 / M_PI); // convert to degrees
    bearingDegrees = (bearingDegrees > 0.0 ? bearingDegrees : (360.0 + bearingDegrees)); // correct discontinuity
    return bearingDegrees;
    }