title: Swift 3.0 Using a Table View to Show and Add Comments
body: <p>I am interested in having a tableview for comments (something similar to instagram comments). So far, I have used a custom cell to set up a textView for comments in my set array, dataName. I was wondering how I could go about setting up a textfield and button on the last row of the tableview that would act as the place to input more comments. Do I need to create another customcell for this and implement this in cellForRowAt indexPath ? </p>
  
  <pre><code>var comments = ["I like this item","Where did you get this?", "I can't believe you found this!", "Hello", "Yay"]  
  
  func numberOfSections(in tableView: UITableView) -&gt; Int {
      return 1
  }
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return comments.count
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! CustomCell
  
  
      cell.commentView.text = dataName[indexPath.row]
      cell.commentView.textColor = UIColor.lightGray
      cell.commentView.isEditable = false
      cell.commentView.isScrollEnabled = false
  
  
      return cell
  }
  </code></pre>