Skip to content

fvolchyok/CTKFlagPhoneNumber

 
 

Repository files navigation

CTKFlagPhoneNumber

CTKFlagPhoneNumber is a phone number textfield with a fancy country code picker.

CI Status Version License Platform Language

Screenshot

sample

Example

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

Requirements

Installation

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

pod "CTKFlagPhoneNumber"

Usage

You can programmatically change the choosen flag:

phoneNumberTextField.setFlag(with: "FR")

and the phone number:

phoneNumberTextField.set(phoneNumber: "0600000001")

You can also get the phone number to E164 format:

print(phoneNumberTextField.getPhoneNumber())
// Output: +33600000001

Conception

This library is high inspired of MRCountryPicker library and use libPhoneNumber-iOS library. https://github.com/xtrinch/MRCountryPicker / https://github.com/iziz/libPhoneNumber-iOS

Author

grifas, aurelien.grifasi@chronotruck.com

Don't hesitate to contact me or make a pull request to upgrade this library.

License

CTKFlagPhoneNumber is available under the Apache license. See the LICENSE file for more info.

About

A formatted phone number UITextField with country flag picker.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.0%
  • Other 1.0%