UITableView Static First Cell with Google SDK
<p>I am trying to figure out how to have a static first cell in a UITableView and then have dynamic results for the rest of the cells.</p>

<p>More specifically, I am using the Google SDK and when the user types in an address or location into a UISearchBar then results autocomplete in a UITableView below.  I want the first cell under the Search Bar to remain static and say "Current Location" and then the autocomplete results underneath that.</p>

<p>I tried using an approach similar to what's outlined <a href="https://stackoverflow.com/questions/31718047/swift-how-to-use-static-cell-in-dynamic-uitableview">here</a>. I can't figure out how to make it work because this makes the index returned from Google autocomplete out of range.  </p>

<p>Here's the general approach that I've been trying that didn't work:</p>

<pre><code> override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
    return 1
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
    return self.searchResultsGoogle.count + 1
}

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {

    //let cell = tableView.dequeueReusableCellWithIdentifier("cellIdentifier", forIndexPath: indexPath)

    if indexPath.row == 0 {

        let cell = self.tableView.dequeueReusableCellWithIdentifier("cellIdentifier", forIndexPath: indexPath)
        cell.textLabel?.text = "Current Location"
        cell.textLabel?.textColor = UIColor(red: 14/255, green: 122/255, blue: 254/255, alpha: 1)
        return cell

    }
    else {

        let cell1 = self.tableView.dequeueReusableCellWithIdentifier("cellIdentifier", forIndexPath: indexPath)
        cell1.textLabel?.text = self.searchResultsGoogle[indexPath.row]
        return cell1
    }

}
</code></pre>

<p>Any ideas on how to fix this?  Thanks!</p>