title: How to group multiple imageview to have 1 tap gesture recognizer?
body: <p>I have 5 imageviews in it. I need to get id of the imageview that is tapped. I tried adding tap gesture identifier and get sender's id, but I am not getting it.</p>
  
  <p>What I have tried till now is as follows</p>
  
  <pre><code>@IBOutlet weak var userRateViewStar1ImageOutlet         : UIImageView!
  
  @IBOutlet weak var userRateViewStar2ImageOutlet         : UIImageView!
  
  @IBOutlet weak var userRateViewStar3ImageOutlet         : UIImageView!
  
  @IBOutlet weak var userRateViewStar4ImageOutlet         : UIImageView!
  
  @IBOutlet weak var userRateViewStar5ImageOutlet         : UIImageView!
  
  @IBOutlet weak var userRateViewTextAreaOutlet           : UITextView!
  
  @IBOutlet var starOutletCollectionOutlet                : [UIImageView]!
  
  
   @IBAction func starRatingAction(_ sender: UITapGestureRecognizer)
  {
      var tag = sender.view!.tag
  
      print(tag)
  
  }
  </code></pre>
  
  <p>Basically I am trying to implement rate feature.</p>
  
  <p>So can someone suggest me a way to implement this?</p>