iphone image not rotating properly aacording to location upon camera view
<p>i am developing application which point towards the particular location, i have calculate angle between current coordinate to specific coordinate and my image is rotating by that difference but image rotation is fixed means when i change my direction the image is not moved it remain fix to specific postion, i want that the image should be moved aacording to the actual position where it is located(where we want to reach) thanks for the help in advance below is my code..</p>

<pre><code>-(float) angleToRadians:(float) a {
    return ((a/180)*M_PI);
}
- (float) getHeadingForDirectionFromCoordinate:(CLLocationCoordinate2D)fromLoc toCoordinate:(CLLocationCoordinate2D)toLoc
{

    float fLat = [self angleToRadians:fromLoc.latitude];
    float fLng = [self angleToRadians:fromLoc.longitude];
    float tLat = [self angleToRadians:toLoc.latitude];
    float tLng = [self angleToRadians:toLoc.longitude];
    float result= atan2f(sin(tLng-fLng)*cos(tLat), cos(fLat)*sin(tLat)-sin(fLat)*cos(tLat)*cos(tLng-fLng)); 

    return RadiansToDegrees(result);
}

- (void) scanButtonTouchUpInside {
    UIImage *overlayGraphic = [UIImage imageNamed:@"GFI.jpg"];
        overlayGraphicView = [[UIImageView alloc] initWithImage:overlayGraphic];
overlayGraphicView.frame = CGRectMake(50, 50, 50, 80);
        [self addSubview:overlayGraphicView];

    float angle =[self getHeadingForDirectionFromCoordinate:currentlocation  toCoordinate:pointlocation];
    if(angle &lt; 0.0)
        angle += 2*M_PI;
overlayGraphicView.transform=CGAffineTransformMakeRotation(angle);


}
</code></pre>
