title: how to make my image clickable
body: <p>Obviously I missunderstood UIImageView vs UIImage, in order to register gesture(such as tap/click) on image, i need to have  image in uiimageview and register gesture on uiimageview not on uiimage. </p>
  
  <p>So this piece of code works for me :</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect {    
      Obj *obj = ... obj has imageHref which is NSString
  
      UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:obj.imageHref]]; 
      [image drawInRect:CGRectMake((self.frame.size.width/2) - (image.size.with/2), (self.frame.size.height / 2) - (image.size.height / 2), image.size.width, image.size.height)];
  
  }
  </code></pre>
  
  <p>This gives me the centered image, but useless because I want it to be clickable so I though just do it with UIImageview instead like this :</p>
  
  <pre><code>  - (void)drawRect:(CGRect)rect {    
              Obj *obj = ... obj has imageHref which is NSString
  
              UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:obj.imageHref]]; 
  
      CGRect rect1=CGRectMake((self.frame.size.width/2) - (image.size.width/2), (self.frame.size.height / 2) - (image.size.height / 2), image.size.width, image.size.height);
  
      UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:radioStationImage];
  
  UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imageTapped:)];
  
      [backgroundImageView addGestureRecognizer:tap];
  
              [backgroundImageView drawRect:rect1];
  
          }
  </code></pre>
  
  <p>I just want to make this image clickable to do some kind of action when clicked, how hard can this be? </p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>I'm actually implementing :</p>
  
  <p><a href="https://github.com/andreyvit/SoloComponents-iOS/tree/master/ATPagingView" rel="nofollow">https://github.com/andreyvit/SoloComponents-iOS/tree/master/ATPagingView</a></p>
  
  <p>Which offers neat page scroll. But with clickable images in the middle of screen not page 1, 2 etc ..</p>
  
  <p>EDIT 2 :</p>
  
  <p>Any perspective on this today?</p>