title: Tap gesture on multiple imageview inside scrollview not firing event , only first imageview tap gesture working?
body: <p>Scenario is I have imageview which I have added inside a scrollview and then tapgesture added on each imageview but only first one imageview firing event .</p>
  
  <p>Have tried following :</p>
  
  <p><strong>1. Created Extension of imageview</strong></p>
  
  <pre><code>extension UIImageView {
    public func openMenu() {
      let tapGestureRecognizer = UITapGestureRecognizer(target:self, action:Selector("handleTapGesture:"))
      //mImg.addGestureRecognizer()
      self.addGestureRecognizer(tapGestureRecognizer)
      print("open")
    }
  }
  </code></pre>
  
  <p><strong>2. Added tap gesture in the loop (the way imageview are added on scrollview same way tapgesture added )</strong> </p>
  
  <pre><code>//the loop go till all images will load
  for var index = 0; index &lt; imagesName.count; index++ {
    let mImg: UIImageView = UIImageView()          
    let pDict = homePageProductArr[index] as NSDictionary
  
    //Create a UIVIEW 
    let containerView:UIView = UIView(frame: CGRect(x: 0, y: 0, width: 80, height: 100))
    let nameLabel:UILabel = UILabel(frame:CGRect(x: xOffset+20, y: 85, width: 100, height: 20))
    nameLabel.text = (pDict.objectForKey("CategoryName") as! String)
    nameLabel.font = UIFont(name: "Helvetica Neue", size: 10.0)
    containerView.addSubview(nameLabel)
  
    let tapMenuCategoryImageTGR = UITapGestureRecognizer(target: self, action: Selector("handleTapGesture:"))
    containerView.addGestureRecognizer(tapMenuCategoryImageTGR)
  
    // make the imageview object because in scrollview we need image
    mImg.frame = CGRectMake(5 + xOffset, 0, 80, 80)
    // the offset represent the values, used so that topleft for each image will
    // change with(5+xOffset, 0)and the bottomright(160, 110)
    //mImg.image = UIImage(named: imagesName[index])
    mImg.imageFromUrl(imagesName[index])
    //mImg.imageFromServerURL(imagesName[index])
    //Creating Circular Image
    //mImg.layer.borderWidth = 1
    mImg.layer.masksToBounds = true
    mImg.layer.borderColor = UIColor.whiteColor().CGColor
    mImg.layer.cornerRadius = mImg.frame.height/2
    mImg.clipsToBounds = false
    mImg.openMenu()
    mImg.userInteractionEnabled = true
    mImg.addGestureRecognizer = tapMenuCategoryImageTGR
  
    // The image will put on the img object
    images.insert(mImg, atIndex: index)
    //Put the img object at the images array which is mutable array
    scrollview.contentSize = CGSizeMake(120 + xOffset, 110)
    //scroll view size show after 125 width the scroll view enabled 
    scrollview.addSubview(images[index] as! UIView)
    //set images on scroll view
    xOffset += 100
  }
  </code></pre>
  
  <p>Kindly share your suggestions on it .</p>