Skip to content

anpkmr/SwiftyCountryPicker

Repository files navigation

SwiftyCountryPicker

CI Status Version License Platform

Example

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

Screen Shots:-

Requirements

Library don't depeneds on any third party library.

Installation

SwiftyCountryPicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftyCountryPicker'

Basic configuration

1- Add a pickerView in your storyBoard. 2- From the attribute inspector set your pickerView class name to

CountryPickerView 

3- Create outlet for your countryPicker in ViewController

@IBOutlet weak var pickerView:CountryPickerView!

3- On your view controller add the following code to setup countryPicker

pickerView.setCountryPickerView(hideflag: false, countryName: false, countryCode: false, countrydialCode: false) 

4- You can add your own done and cancel button above the picker . On done button press you can call the below closure to get the selected country. and other info.

pickerView.getSelctedCountry { (data) in print(data.countryCode)}

Author

anpkmr, [email protected]

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published