title: Full screen an image inside a tableviewcell when tapped Swift
body: <p>I want my image that is inside my table view cell to be full screened when tapped as prompted by a uigesturerecognizer.</p>
  
  <p>The problem is that my didSelectRowAt func does not recognize the <code>postedimage</code>identifier.</p>
  
  <blockquote>
    <p>Use of unresolved identifier 'postedImage'</p>
  </blockquote>
  
  <p>How do I get around this issue?</p>
  
  <pre><code> override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
      let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! FeedTableViewCell
  
      imageFiles[indexPath.row].getDataInBackground { (data, error) in
  
          if let imageData = data {
  
              if let downloadedImage = UIImage(data: imageData) {
  
                  cell.postedImage.image = downloadedImage
  
              }
  
          }
  
      }
  
      cell.postedImage.image = UIImage(named: "test.png")
  
      return cell
  }
  
  func removeImage() {
  
      let imageView = (self.view.viewWithTag(100)! as! UIImageView)
      imageView.removeFromSuperview()
  }
  
  func addImageViewWithImage(image: UIImage) {
  
      let imageView = UIImageView(frame: self.view.frame)
      imageView.contentMode = .scaleAspectFit
      imageView.backgroundColor = UIColor.black
      imageView.image! = image
      imageView.tag = 100
  
      let dismissTap = UITapGestureRecognizer(target: self, action: #selector(self.removeImage))
      dismissTap.numberOfTapsRequired = 1
      imageView.addGestureRecognizer(dismissTap)
      self.view.addSubview(imageView)
  }
  
  override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      self.addImageViewWithImage(image: postedImage[indexPath.row])
  }
  </code></pre>