title: Segue when the `UITableViewCell is tapped in Swift
body: <p>This is my first time trying this and I just can't figure it out. Ive read many questions like this but none seem to work so if somebody could please explain how to segue to a detail view when cell tapped on I would be so grateful!</p>
  
  <pre><code>override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      // #warning Incomplete implementation, return the number of sections
      return 1
  }
  
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      // #warning Incomplete implementation, return the number of rows
      return names.count
  }
  
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let LECell = tableView.dequeueReusableCellWithIdentifier("LocalPostsCell", forIndexPath: indexPath) as! LocalPostsTableViewCell
  
      imageFiles[indexPath.row].getDataInBackgroundWithBlock { (data, error) -&gt; Void in
          if let downloadedImage = UIImage(data: data!) {
  
              LECell.postImage.image = downloadedImage
          }
      }
  
  
      LECell.postName.text = names[indexPath.row]
      LECell.postLocation.text = locations[indexPath.row]
      LECell.postDate.text = dates[indexPath.row]
  
  
  
      return LECell
  }
  
  let localPostsDetailSegue = "showLocalPostsDetailView"
  
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if segue.identifier == localPostsDetailSegue {
          if let destination = segue.destinationViewController as? LocalPostsDetailViewController {
              if let postIndex = tableView.indexPathForSelectedRow[indexPath.row] {
                  destination.postName = names[postIndex]
              }
          }
      }
  }
  </code></pre>