title: Swift: How to link UITableView to individual UIDetailView Pages
body: <p>At present I have a table view with a list of universities. Upon tapping on one of these I would like to display information about these universities. My tableview cells have style: subtitle. </p>
  
  <p>My tableview data source is:</p>
  
  <pre><code>override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      return 1
  }
  
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return schools.count
  }
  
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath)
      -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCellWithIdentifier("SchoolCell", forIndexPath: indexPath)
              as UITableViewCell
  
          let school = schools[indexPath.row] as Schools
          cell.textLabel?.text = school.university
          cell.detailTextLabel?.text = school.name
          return cell
  }
  </code></pre>
  
  <p>The schools.swift page:</p>
  
  <pre><code>class Schools: NSObject {
  var university: String
  var name: String
  
  
  init(university: String, name: String) {
      self.university = university
      self.name = name
      super.init()
  }
  }   
  </code></pre>
  
  <p>The sample data page:</p>
  
  <pre><code>let schoolsData = [ Schools(university: "Aberdeen", name: "School of Medicine")
  //and so on for each university
  </code></pre>
  
  <p>I have been trying for hours to link these pages using segues. I have created the link between the tableviewcell and the view controller on the storyboard by ctrl-click dragging, but I'm stuck with the code part (prepare for segue) on my SchoolsViewTableController (table view) and my SchoolViewController.</p>
  
  <p>I would like the detail page to display the "university" (for example Aberdeen) as the title. </p>
  
  <p>Any help would be greatly appreciated - I am relatively new to swift so please understand my inexperience! </p>
  
  <p>Thanks</p>
  
  <p>Ed</p>