Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughbe/phone-number-picker
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
https://github.com/hughbe/phone-number-picker
Last synced: 2 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/hughbe/phone-number-picker
- Owner: hughbe
- License: mit
- Created: 2015-09-07T12:49:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T12:47:11.000Z (almost 7 years ago)
- Last Synced: 2024-08-15T00:20:02.531Z (5 months ago)
- Language: Swift
- Homepage:
- Size: 166 KB
- Stars: 140
- Watchers: 9
- Forks: 25
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios-star - phone-number-picker - 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. (UI / Font)
- awesome-ios - phone-number-picker - 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. (UI / Font)
README
# PhoneNumberPicker
A simple and easy to use view controller enabling you to enter a phone number with a country code similar to WhatsAppScreenshots
--------------
![alt text](https://github.com/hughbe/PhoneNumberPicker/blob/master/resources/screenshots/1.png "Screenshot 1")
![alt text](https://github.com/hughbe/PhoneNumberPicker/blob/master/resources/screenshots/2.png "Screenshot 2")Installation
--------------
Drag and drop the *src* folder to your projectSetup
--------------
``` swift
// 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