Latest 1.2.3
Homepage https://github.com/CrystalMarch/CountryPickerView
License MIT
Platforms ios 9.0, requires ARC
Authors

CountryPickerView

A simple country code picker on iOS, support chinese,english,spanish,national flag,ISO 3166-1 and calling code.(一个简洁的iOS国家代码选择器,支持中文、英语、西班牙语、国旗、ISO 3166-1、国际电话区号)
your can search the ISO 3166 code,calling code or country name,the picker view will refresh automatically according to the content of your search.(你可以搜索ISO 3166码,电话区号或者国家名字,pikerView将会根据你搜索的内容自动更新搜索结果)

Effect picture

alt text

Installation

CocoaPods

Add to your Podfile:

Swift:

use_frameworks!
pod 'CountryPickerViewSwift'

And then:

pod install

Import the framework in your code:

import CountryPickerViewSwift

Quick start

         let countryView = CountrySelectView.shared
        countryView.show()
//        countryView.dismiss() //dismiss the picker view
        countryView.barTintColor = .gray //default is green
        countryView.searchBarPlaceholder = "phone code" //default is "search"
        countryView.displayLanguage = .chinese //default is english
        countryView.countryNameFont = UIFont.systemFont(ofSize: 18) //default is  UIFont.systemFont(ofSize: 17)
        countryView.countryNameColor = .brown //default is black
        countryView.countryPhoneCodeFont = UIFont.systemFont(ofSize: 10)//default is  UIFont.systemFont(ofSize: 14)
        countryView.countryNameColor = .black //default is gray
        countryView.selectedCountryCallBack = { countryDic in
            print(countryDic)
            /* countrydic format like
                 [
                      "en": "Angola",
 +                    "es": "Angola",
                      "zh": "安哥拉",
                      "locale": "AO",
                      "code": 244
                     "countryImage": UIImage
                 ]

             */
        }

Latest podspec

{
    "name": "CountryPickerViewSwift",
    "version": "1.2.3",
    "summary": "A simple country code picker on iOS, support Chinese,english,national flag,ISO 3166-1 and calling code.",
    "homepage": "https://github.com/CrystalMarch/CountryPickerView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Crystal": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/CrystalMarch/CountryPickerView.git",
        "tag": "1.2.3"
    },
    "source_files": [
        "Resources/*.swift",
        "Resources/*.xib"
    ],
    "resources": "Resources/CountryPicker.bundle",
    "requires_arc": true
}

Pin It on Pinterest

Share This