Latest2.4.1
Homepagehttps://github.com/graycampbell/GCCountryPicker
LicenseMIT
Platformsios 9.0, requires ARC

banner

Release
CocoaPods
Documentation
Codacy Code Quality
Swift 4 Compatible
Platform
License

CocoaPods

pod 'GCCountryPicker'

Implementation

  1. Add GCCountryPicker to your file’s import statements.

    import GCCountryPicker
  2. Create an instance of GCCountryPickerViewController.

    let countryPickerViewController = GCCountryPickerViewController(displayMode: .withoutCallingCodes)
  3. Set the delegate, data source (optional), and navigation title.

    countryPickerViewController.delegate = self
    countryPickerViewController.dataSource = self
    countryPickerViewController.navigationItem.title = "Countries"
  4. Embed the country picker view controller in a navigation controller.

    let navigationController = UINavigationController(rootViewController: countryPickerViewController)
  5. Present the navigation controller.

    self.present(navigationController, animated: true, completion: nil)
  6. Implement GCCountryPickerDelegate.

    func countryPickerDidCancel(_ countryPicker: GCCountryPickerViewController)
    
    func countryPicker(_ countryPicker: GCCountryPickerViewController, didSelectCountry country: GCCountry)
  7. Implement GCCountryPickerDataSource if necessary.

    func countryCodes(for countryPicker: GCCountryPickerViewController) -> [String]

Documentation

License

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

Latest podspec

{
    "name": "GCCountryPicker",
    "version": "2.4.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "A localized, searchable country picker view controller with optional calling codes for iOS 9+ written in Swift.",
    "description": "A localized, searchable country picker view controller UI component with optional calling codes for iOS 9+ written in Swift.",
    "homepage": "https://github.com/graycampbell/GCCountryPicker",
    "authors": "Gray Campbell",
    "source": {
        "git": "https://github.com/graycampbell/GCCountryPicker.git",
        "tag": "2.4.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/GCCountryPicker/*.{h,m,swift}",
    "requires_arc": true,
    "module_name": "GCCountryPicker"
}

Pin It on Pinterest

Share This