bananaRanger / AYCountries

A list of countries with flags and phone codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AYCountries

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

About

A list of countries with flags and phone codes.

A single UIViewController with UITableView that display list of countries for selection.

Installation

AYCountries is available through CocoaPods. To install it, simply add the following line to your Podfile:

inhibit_all_warnings!

target 'YOUR-TARGET-NAME' do
  use_frameworks!
	pod 'AYCountries'
end

Usage

// 'country' - object of class 'AYCountry' (selected country).
// 'vc' - object of class 'UIViewController' (countries list).
// 'countriesViewController' - created object of class 'UIViewController' with list of countries.

let countriesViewController = AYCountriesConfigurator.configure { [weak self] country, vc in
  print(country?.name)
  vc.dismiss(animated: true, completion: nil)
}
present(countriesViewController, animated: true, completion: nil)

countriesViewController.fetch(with: Query.name("ukr")) // fetch countries that contains 'ukr' in the name (case insensitive)

Author

Anton Yereshchenko

License

AYCountries is available under the MIT license. See the LICENSE file for more info.

About

A list of countries with flags and phone codes.

License:MIT License


Languages

Language:Swift 95.1%Language:Ruby 4.9%