All Projects → 4taras4 → Countrycode

4taras4 / Countrycode

Licence: mit
🎯 Swift country and phone code Picker

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Countrycode

World countries
Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP and SQL formats, in multiple languages and with national flags included
Stars: ✭ 598 (+241.71%)
Mutual labels:  countries, flags
country-flags
A small package to convert a country code to the corresponding country flag emoji
Stars: ✭ 27 (-84.57%)
Mutual labels:  countries, flags
Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (-20.57%)
Mutual labels:  countries, flags
flagpack
A lightweight flag icon toolkit for the web.
Stars: ✭ 51 (-70.86%)
Mutual labels:  countries, flags
countriesNowAPI
CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎
Stars: ✭ 78 (-55.43%)
Mutual labels:  countries, flags
vue-flagpack
Flagpack contains 260+ easily implementable flag icons to use in your design or code project.
Stars: ✭ 42 (-76%)
Mutual labels:  countries, flags
PhoneCountryCodePicker
An iOS tableview picker for PhoneCountryCode (English & Chinese supported)
Stars: ✭ 31 (-82.29%)
Mutual labels:  picker, flags
Flagphonenumber
A formatted phone number UITextField with country flag picker.
Stars: ✭ 371 (+112%)
Mutual labels:  flags, picker
Countries
Rinvex Country is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.
Stars: ✭ 1,365 (+680%)
Mutual labels:  countries, flags
Amazing Time Picker
Timepicker (Clock Picker) for Angular 2, Angular 4 and Angular 5, Angular 6, Angular 7 - Compatible with Angular Material
Stars: ✭ 142 (-18.86%)
Mutual labels:  picker
Countries
🌎 Public GraphQL API for information about countries
Stars: ✭ 156 (-10.86%)
Mutual labels:  countries
Laravel cities
Find any country/city in the world. Get Long/Lat etc. Deploy geonames.org database localy. Optimized DB tree
Stars: ✭ 133 (-24%)
Mutual labels:  countries
Restcountries
Get information about countries via a RESTful API
Stars: ✭ 2,054 (+1073.71%)
Mutual labels:  countries
Universalpickerdialog
Android dialog with auto generated pickers inside, which depends on count of datasets provided. Made by Stfalcon
Stars: ✭ 138 (-21.14%)
Mutual labels:  picker
Mapsicon
A free collection of maps for every country in the world, available in 11 sizes or in SVG.
Stars: ✭ 1,999 (+1042.29%)
Mutual labels:  countries
Nkvphonepicker
An UITextField subclass to simplify country code's picking. Swift 5.0
Stars: ✭ 131 (-25.14%)
Mutual labels:  picker
Flagpack Core
Flagpack contains 260+ easily implementable flag icons to use in your design or code project.
Stars: ✭ 127 (-27.43%)
Mutual labels:  flags
Mpvue Picker
基于 mpvue 框架的小程序选择控件,支持单列,多列,联动。
Stars: ✭ 173 (-1.14%)
Mutual labels:  picker
Brpickerview
BRPickerView 封装的是iOS中常用的选择器组件,主要包括:日期选择器(支持年月日、年月等15种日期样式选择,支持设置星期、至今等)、地址选择器(支持省市区、省市、省三种地区选择)、自定义字符串选择器(支持单列、多列、二级联动、三级联动选择)。支持自定义主题样式,适配深色模式,支持将选择器组件添加到指定容器视图。
Stars: ✭ 2,149 (+1128%)
Mutual labels:  picker
Flutter app
🔥🔥🔥本项目包括各种基本控件使用(Text、TextField、Icon、Image、Listview、Gridview、Picker、Stepper、Dialog、Slider、Row、Appbar、Sizebox、BottomSheet、Chip、Dismissible、FlutterLogo、Check、Switch、TabBar、BottomNavigationBar、Sliver等)、豆瓣电影、tubitv、每日一文、和天气、百姓生活、随机诗词、联系人、句子迷、好奇心日报、有道精品课、高德定位、音乐播放器🎵、追书神器等板块
Stars: ✭ 2,140 (+1122.86%)
Mutual labels:  picker

CountryPicker

Swift Package Manager compatible Build Status Platform Swift version Swift version Beerpay

Picker code Swift 3 / 4 / 5.

Example

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

Usage

Make your UIPickerView a class of CountryPicker, set its countryPickerDelegate and implement its countryPhoneCodePicker method.

Example:

import CountryPicker

class ViewController: UIViewController, CountryPickerDelegate {

    @IBOutlet weak var picker: CountryPicker!
   
    
    override func viewDidLoad() {
        super.viewDidLoad()
       //get current country
        let locale = Locale.current
        let code = (locale as NSLocale).object(forKey: NSLocale.Key.countryCode) as! String?
        //init Picker
        picker.displayOnlyCountriesWithCodes = ["DK", "SE", "NO", "DE"] //display only
        picker.exeptCountriesWithCodes = ["RU"] //exept country
        let theme = CountryViewTheme(countryCodeTextColor: .white, countryNameTextColor: .white, rowBackgroundColor: .black, showFlagsBorder: false)        //optional for UIPickerView theme changes
        picker.theme = theme //optional for UIPickerView theme changes
        picker.countryPickerDelegate = self
        picker.showPhoneNumbers = true
        picker.setCountry(code!)

    }
    
    // a picker item was selected
    func countryPhoneCodePicker(_ picker: CountryPicker, didSelectCountryWithName name: String, countryCode: String, phoneCode: String, flag: UIImage) {
       //pick up anythink
      code.text = phoneCode
    }

}

Integration

CocoaPods (iOS 8+, OS X 10.9+)

CountryPicker is available through CocoaPods. To install

Swift 4-5 (Xcode 10+) pod 'CountryPickerSwift', '1.8'

Swift 3.1 (Xcode 9) pod 'CountryPickerSwift', '1.7'

Swift 3.0+ (Xcode 8) pod 'CountryPickerSwift', '1.4.4'

it, simply add the following line to your 'Podfile':

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
    pod 'CountryPickerSwift'
end

Swift Package Manager

You can use The Swift Package Manager to install CountryPicker by adding the proper description to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "[email protected]:4taras4/CountryCode.git")
    ]
)

Note that the Swift Package Manager is still in early design and development, for more information checkout its GitHub Page

Manually

To use this library in your project manually just drag and drop CountryPicker folder to your project.

Author

4taras4, [email protected]

License

CountryPicker is available under the MIT license. See the LICENSE file for more info. release-link

Donate

Donation Bitcoin 141Q3KduSqvTtMbrU6YouSErDBh1SpiLrL

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].