Skip to content

A simple and easy to use view controller enabling you to enter a phone number with a country code similar to WhatsApp written in Swift

License

Notifications You must be signed in to change notification settings

hughbe/phone-number-picker

Repository files navigation

PhoneNumberPicker

A simple and easy to use view controller enabling you to enter a phone number with a country code similar to WhatsApp

Screenshots

alt text alt text

Installation

Drag and drop the src folder to your project

Setup

// 1. Add the protocol PhoneNumberViewControllerDelegate
class ViewController: UIViewController,PhoneNumberViewControllerDelegate {


func presentPhoneNumberViewController { //Your function. Can be any name
   // 2. Create the PhoneNumberViewController
   let phoneNumberViewController = PhoneNumberViewController.standardController()

   // 3. Set the delegate
   phoneNumberViewController.delegate = self

   // 4. Present the PhoneNumberViewController (Navigation Controller)
   navigationController?.pushViewController(phoneNumberViewController, animated: true)
}

Country Selector

You can manually present a CountriesViewController to present a list of all countries and their phone extensions to the user

About

A simple and easy to use view controller enabling you to enter a phone number with a country code similar to WhatsApp written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages