title: I want to rotate image in iOS as per angle
body: <p><img src="https://i.stack.imgur.com/d9Mxt.png" alt="http://screencast.com/t/OAb6BDNgiK"></p>
  
  <p>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</p>
  
  <p><img src="https://i.stack.imgur.com/EjGMW.png" alt="http://screencast.com/t/xuzngv8gRY"></p>
  
  <p>Her is my code </p>
  
  <pre><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];
  }
  </code></pre>