# CountrySelectionViewController

    public final class CountrySelectionViewController: UIViewController,
        UITableViewDelegate,
        UITableViewDataSource,
        UISearchBarDelegate

A view controller that allows the user to select a country.

Show on GitHub

### Properties

- `delegate`

  Country selection view controller delegate

  #### Declaration

  Swift

      public weak var delegate: CountrySelectionViewControllerDelegate?

  Show on GitHub

### Lifecycle

- `viewDidLoad()`

  Called after the controller's view is loaded into memory.

  #### Declaration

  Swift

      override public func viewDidLoad()

  Show on GitHub
- `viewWillAppear(_:)`

  Undocumented

  #### Declaration

  Swift

      public override func viewWillAppear(_ animated: Bool)

  Show on GitHub

### UITableViewDataSource

- `numberOfSections(in:)`

  Asks the data source to return the number of sections in the table view.

  #### Declaration

  Swift

      public func numberOfSections(in tableView: UITableView) -> Int

  Show on GitHub
- `tableView(_:willDisplay:forRowAt:)`

  Undocumented

  #### Declaration

  Swift

      public func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)

  Show on GitHub
- `tableView(_:numberOfRowsInSection:)`

  Tells the data source to return the number of rows in a given section of a table view.

  #### Declaration

  Swift

      public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int

  Show on GitHub
- `tableView(_:cellForRowAt:)`

  Asks the data source for a cell to insert in a particular location of the table view.

  #### Declaration

  Swift

      public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

  Show on GitHub
- `tableView(_:didSelectRowAt:)`

  Tells the delegate that the specified row is now selected.

  #### Declaration

  Swift

      public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

  Show on GitHub

### UISearchBarDelegate

- `searchBar(_:textDidChange:)`

  Tells the delegate that the user changed the search text.

  #### Declaration

  Swift

      public func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String)

  Show on GitHub
- `searchBarSearchButtonClicked(_:)`

  Tells the delegate that the search button was tapped.

  #### Declaration

  Swift

      public func searchBarSearchButtonClicked(_ searchBar: UISearchBar)

  Show on GitHub
- `searchBarCancelButtonClicked(_:)`

  Tells the delegate that the cancel button was tapped.

  #### Declaration

  Swift

      public func searchBarCancelButtonClicked(_ searchBar: UISearchBar)

  Show on GitHub