Latest 0.0.4
Homepage https://github.com/bestiosdeveloper/PKCountryPicker
License MIT
Platforms ios 11.0
Authors

CocoaPods
codebeat badge

A Swift based helper class that will provide all the countries in the word with their basic information like flag, county name, country code, ISO code, NSN limits and much more.

preview

Requirements

  • iOS 10.0+
  • Xcode 9.4

Installation

For manual instalation, drag Source folder into your project.

or use CocoaPod adding this line to you Podfile:

pod 'PKCountryPicker'

Usage

For Start Loading

1) Just call chooseCountry() method with default instance of PKCountryPicker.

Example:

PKCountryPicker.default.chooseCountry(onViewController: self) { (selectedCountry) in
print("selected country data: (selectedCountry)")
}

Configuration To Change Settings

To change the default configuration of the picker just change the values of PKCountryPickerSettings, Like:

Important Property:

1) shouldAddPlusInCountryCode used to decide to use the "+" sign in front of country code. Default: true

2) toolbarHeight used to give the height of tool bar. Default: 45.0

3) pickerSize used to give the size for the picker view. Default: CGSize(width: <same to screen width>, height: 240.0)

4) rowHeight used to give the height of the each row in picker view. Default: 45.0

5) appearance used to decide the appearance of the picker view. Default: PKCountryPicker.Appearance.light

6) countryNameFont used to set the font of country name text. Default: UIFont.systemFont(ofSize: 15.0)

7) countryNameColor used to set the color of country name text. Default: UIColor.black

8) countryCodeFont used to set the font of country code text. Default: UIFont.systemFont(ofSize: 15.0)

9) countryCodeColor used to set the color of country code text. Default: UIColor.black

Licence

PKCountryPicker is released under the MIT license.

Latest podspec

{
    "name": "PKCountryPicker",
    "version": "0.0.4",
    "summary": "This framework will help you in choosing the country details like flag, county name, country code and much more.",
    "description": "A Swift based helper class that will provide all the countries in the word with their basic information like flag, county name, country code, ISO code, NSN limits and much more.",
    "homepage": "https://github.com/bestiosdeveloper/PKCountryPicker",
    "screenshots": "https://github.com/bestiosdeveloper/PKCountryPicker/blob/master/PKCountryPickerViewDemo/PKCountryPicker.gif",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Pramod Kumar": "[email protected]"
    },
    "social_media_url": "http://pramodkumar.cf/",
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/bestiosdeveloper/PKCountryPicker.git",
        "tag": "0.0.4"
    },
    "source_files": "PKCountryPickerViewDemo/PKCountryPicker/*",
    "resources": "PKCountryPickerViewDemo/PKCountryPicker/*.xcassets"
}

Pin It on Pinterest

Share This