Created
April 28, 2015 21:53
-
-
Save zkkmin/f6d219b05a655d616f84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UITableView delegate protocol methods | |
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { | |
searchController.searchBar.text = searchResults[indexPath.row].placeName | |
showSelectedSearchPlace(searchResults[indexPath.row]) | |
} | |
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
let rowData = searchResults[indexPath.row].placeName | |
let cell = UITableViewCell() | |
cell.textLabel?.text = rowData | |
return cell | |
} | |
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
return searchResults.count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment