title: Swift 4 - Populate tableview and pass array/dictionary data to detail view controller
body: <p>I'll start off by saying, I'm by far not a developer. I'm a designer and trying to put together a working prototype. Sorry if any what I'm asking seems vague but I've scoured YouTube tutorials and answers on here and still was stumped.</p>
  
  <p>I have a view controller with a tableview inside of it. I'm trying to populate the table with an array of information. This is the first area I'm stuck at. I know how to populate a single data point to a cell, but not multiple pieces of data to a cell. The cell should show the beer's name, price and short description as shown in the attached image file. Here's the code that I have in the BeverageViewController currently. Also, the "ipsum lorem" text is additional descriptive text that I don't want shown but I do want it passed to the BeverageDetailsViewController to be displayed there if possible. I wasn't sure how to set up the prepareForSegue or performSegue to reference the selected row.</p>
  
  <pre><code>class BeveragesViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
  
  @IBOutlet weak var BeveragesTableView: UITableView!
  
  // Data
  let beverages = [
      ("Coke", "2.00", "12 fl oz", "ipsum lorem"),
      ("Sprite", "2.00", "12 fl oz", "ipsum lorem"),
      ("Powerade", "2.00", "20 fl oz", "ipsum lorem"),
      ("Blue Moon", "2.00", "12 fl oz", "ipsum lorem"),
      ("Budweiser", "2.00", "12 fl oz", "ipsum lorem"),
      ("Bud Light", "2.00", "12 fl oz", "ipsum lorem"),
      ("Corona", "2.00", "12 fl oz", "ipsum lorem"),
      ("Dos Equis", "2.00", "12 fl oz", "ipsum lorem"),
      ("Fat Tire", "2.00", "12 fl oz", "ipsum lorem"),
      ("Heineken", "2.00", "12 fl oz", "ipsum lorem"),
      ("Red Stripe", "2.00", "12 fl oz", "ipsum lorem"),
      ("Stella Artois", "2.00", "12 fl oz", "Stella Artois Premium Lager"),
      ("Yuengling", "2.00", "12 fl oz", "ipsum lorem")]
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      BeveragesTableView.delegate = self
      BeveragesTableView.dataSource = self
  }
  
  
  //Populate Table 
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return beverages.count
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell  = BeveragesTableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as UITableViewCell
  
      let beverage = beverages[indexPath.row]
  
  
  
      return cell!
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ilI0W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ilI0W.png" alt="UITableView"></a></p>