AJCountryPicker2 2.0.0

AJCountryPicker2 2.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Dec 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Eddie Lau.



  • By
  • Aj Mehra

AJCountryPicker

AJCountryPicker is library to pick country code and flag written in Swift.

Features

  • [x] Country Flag
  • [x] Country Code
  • [x] Country Calling Code
  • [x] Country Name
  • [x] Colusres to pick country
  • [x] Delegates to pick country

Installation

Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).

Demo

Do pod try AJCountryPicker in your console and run the project to try a demo.

Basic usage

let countryCodePicker = AJCountryPicker { country, code in
            print(country, code)
        }

// To get current country with calling code
let country = countryCodePicker.currentCountryWithCallingCode
print("country name :- ", country.$0)
print("country calling Code :- ", country.$1)

 // Display calling codes
countryCodePicker.showCallingCodes = true
 // Closure to show country details
countryCodePicker.countryWithCodeAndCallingCode = { name, code, dialCode in
    print("country calling Code :- ", dialCode)
}
navigationController?.pushViewController(countryCodePicker, animated: true)

License

AJCountryPicker is released under the MIT license. See LICENSE for details.