CTKFlagPhoneNumber is a phone number textfield with a fancy country code picker.
To run the example project, clone the repo, and run pod install from the Example directory first.
CTKFlagPhoneNumber is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "CTKFlagPhoneNumber"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: +33600000001This library is high inspired of MRCountryPicker library and use libPhoneNumber-iOS library. https://github.com/xtrinch/MRCountryPicker / https://github.com/iziz/libPhoneNumber-iOS
grifas, aurelien.grifasi@chronotruck.com
Don't hesitate to contact me or make a pull request to upgrade this library.
CTKFlagPhoneNumber is available under the Apache license. See the LICENSE file for more info.
