In above image there is one white line, I want to animate this image in the circle only as per angle. Suppose if my angle is 20 degree then that white line animate in 58 degree, and it will come like following image
Her is my code
UIImageView *imgBenchmark = [[UIImageView alloc]initWithFrame:CGRectMake(153,70, 1, 26)];
self.benchmark = imgBenchmark;
[imgBenchmark release];
self.benchmark.layer.anchorPoint = CGPointMake(self.benchmark.layer.anchorPoint.x, self.benchmark.layer.anchorPoint.y*2);
self.benchmark.backgroundColor = [UIColor clearColor];
self.benchmark.image = [UIImage imageNamed:@"line.png"];
[self.view addSubview:self.benchmark];
[self rotateIt1:20];
-(void) rotateIt1:(float)angl
{
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.01f];
[self.benchmark setTransform: CGAffineTransformMakeRotation((M_PI / 9) *angl)];
[UIView commitAnimations];
}