title: How to go from table view controller to a detail controller and go back
body: <p>I have a table view controller with cells and on clicking a cell I want to open a view controller for displaying the details. On the detail view controller I want to have a navigation action like a navigation bar with an item to go back to the table view controller. Then the table view controller should display the last shown cell which I choosed and not the first cell. I hope you know what I mean. And I don't want to have a navigation bar on the table view controller that is displayed. So a navigation controller is maybe not the solution for me.</p>
  
  <p>At the moment my code of the table view controller to open the detail view controller looks like this:</p>
  
  <pre><code>override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
  
      let vcMissionDetail : ViewControllerMissionDetail = self.storyboard?.instantiateViewControllerWithIdentifier("MissionDetail") as ViewControllerMissionDetail;
  
      self.presentViewController(vcMissionDetail, animated: true, completion: nil)    
  }
  </code></pre>
  
  <p>I use the <code>presentViewController</code> to load the detail view controller. Is the use of  <code>prepareForSegue</code> the better solution?</p>
  
  <p>And the detail view controller looks like this. I use a navigation bar with a bar button item to go back to the table view controller (Action <code>goToFeed</code>), but I'm not happy with this solution. Also I want to open the table view controller:</p>
  
  <pre><code>import UIKit
  
  class ViewControllerMissionDetail: UIViewController {
  
      @IBOutlet var label: UILabel!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      @IBAction func goToFeed(sender: AnyObject) {
  
          //init view controller for feed
          let vcFeed: UIViewController = self.storyboard?.instantiateViewControllerWithIdentifier("ViewControllerFeed") as UIViewController;
  
          //vcFeed.modalTransitionStyle = UIModalTransitionStyle.CoverVertical
  
          self.presentViewController(vcFeed, animated: true, completion: nil)
      }
  }    
  </code></pre>
  
  <p>THX!</p>