title: Position on UIImageView
body: <p>Me again. I have a simple question. I have an UIImageView like the one shown below.
  <a href="http://img683.imageshack.us/img683/1999/volumen.png" rel="nofollow noreferrer">alt text http://img683.imageshack.us/img683/1999/volumen.png</a></p>
  
  <p>That UIimageView is supposed to be the knob to control the volume of my iphone project. My question is, how to know the positions of bar on the UIImageView when it is rotated? Because the volume needs to be 0.5 when the little bar on the cercle is vertical.</p>
  
  <p>I got a piece of code which is (in the touchMoved method):</p>
  
  <pre><code>float dx = locationT.x  - imgVVolume.center.x;
  float dy = locationT.y  - imgVVolume.center.y;
  
  
  CGFloat angleDif = 0.0f;
  
  movedRotationAngle = atan2(dy,dx);
  
  if (beganRotationAngle == 0.0) {
      beganRotationAngle = movedRotationAngle;
      initialTransform = imgVVolume.transform;
  }
  else {
      angleDif = beganRotationAngle - movedRotationAngle;
      CGAffineTransform newTrans = CGAffineTransformRotate(initialTransform, -angleDif);
      imgVVolume.transform = newTrans;
  }
  </code></pre>
  
  <p>Help please.</p>