title: UITableView Sections from an array of Objects (Swift)
body: <p>I’ve got an array of Transaction objects:</p>
  
  <pre><code>var transactions = [Transaction]()
  </code></pre>
  
  <p>Transaction class:</p>
  
  <pre><code>class Transaction {
      var description : String = ""
      var post_transaction_balance : Double = 0
      var settlement_date : NSDate?
      var dateOnly : NSDate?
   }
  </code></pre>
  
  <p>I need to create a UITableView with sections and each section represents transactions made on particular day</p>
  
  <p>An example of how table structure should look like:</p>
  
  <p>— section header: dateOnly—</p>
  
  <p>transaction [0] title </p>
  
  <p>transaction [3] title </p>
  
  <p>— section header: dateOnly—</p>
  
  <p>transaction [2] title</p>
  
  <p>transaction [7] title </p>
  
  <p>Example of dateOnly value:</p>
  
  <pre><code>dateOnly = (NSDate?) 2016-01-22 00:00:00 UTC
  </code></pre>
  
  <p>I am not sure how to iterate through the array of objects and get the data into the section headers and the cells. I would greatly appreciate any help. </p>