title: Adding section index headers for A to Z UITableView scrolling
body: <p>I am trying to add some section headers for a contacts table view. I have a list of contacts in an <code>Array</code> which might be like this:</p>
  
  <p>Bill Apple<br>
  Borat<br>
  Steve Test  </p>
  
  <p>I have added the following:  </p>
  
  <pre><code>func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
      let currentCollation = UILocalizedIndexedCollation.currentCollation() as UILocalizedIndexedCollation
      let sectionTitles = currentCollation.sectionTitles as NSArray
      return sectionTitles.objectAtIndex(section) as? String
  }
  
  func sectionIndexTitlesForTableView(tableView: UITableView) -&gt; [String]? {
      let currentCollation = UILocalizedIndexedCollation.currentCollation() as UILocalizedIndexedCollation
      return currentCollation.sectionIndexTitles as [String]
  }
  
  func tableView(tableView: UITableView, sectionForSectionIndexTitle title: String, atIndex index: Int) -&gt; Int {
      let currentCollation = UILocalizedIndexedCollation.currentCollation() as UILocalizedIndexedCollation
      return currentCollation.sectionForSectionIndexTitleAtIndex(index)
  }
  </code></pre>
  
  <p>This gets the A-Z headings to show up. However as there is only one section and one array holding the contacts the actual functionality does not work.</p>
  
  <p>Should we be sorting the <code>Array</code> into an alphabetised <code>Array</code> in some sort? So that it has multiple sections? Or is there an easier way to approach this?</p>