title: iOS : detect UIImageView for UITouch Events
body: <p><strong>I've added some</strong> <code>UIImageView</code> <strong>dynamically and filled it with different images, what I am trying to do is "Allow user to set position for any</strong> <code>UIImageView</code>", <strong>for that I used</strong></p>
  
  <pre><code>-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
  {
      //Here I want the object of particular UIImageView on which user touched.
  }
  </code></pre>
  
  <p><strong>In that method I'm doing,</strong></p>
  
  <pre><code>NSLog(@"%@",[touches anyObject]);
  </code></pre>
  
  <p><strong>It returns output</strong></p>
  
  <pre><code>&lt;UITouch: 0x68b95e0&gt; phase: Began tap count: 1 window: &lt;UIWindow: 0x68875d0; frame = (0 0; 320 480); layer = &lt;UIWindowLayer: 0x68b6470&gt;&gt; view: &lt;UIImageView: 0x6a74cf0; frame = (83.7763 83.7763; 182.447 182.447); transform = [0.968912, -0.247404, 0.247404, 0.968912, 0, 0]; alpha = 0.8; opaque = NO; tag = 3; layer = &lt;CALayer: 0x6a74980&gt;&gt; location in window: {161, 230} previous location in window: {161, 230} location in view: {52.7761, 105.448} previous location in view: {52.7761, 105.448}
  </code></pre>
  
  <p><strong>Note, in above output, it showing my</strong> <code>UIImageView</code> <strong>object on which I touched. But I want that object from it!!!</strong></p>
  
  <p>I want my <code>UIImageView</code> on which user touched?, I have already set property <code>userInteractionEnabled=YES</code> so the problem isn't with it!</p>
  
  <p><strong>I used below code to get it so, but it wont work.</strong></p>
  
  <pre><code>NSInteger tag=[[[touches anyObject] view] tag]; //It only returns tag of UIView tag
  </code></pre>
  
  <p><strong>I Google it but doesn't come with solution!</strong></p>
  
  <p><strong>Thank you in advance for any help!</strong></p>