{"id":17216894,"url":"https://github.com/nikkovios/nkvphonepicker","last_synced_at":"2025-10-11T22:25:54.574Z","repository":{"id":47187956,"uuid":"92344004","full_name":"NikKovIos/NKVPhonePicker","owner":"NikKovIos","description":"An UITextField subclass to simplify country code's picking. Swift 5.0","archived":false,"fork":false,"pushed_at":"2021-09-09T08:44:34.000Z","size":7094,"stargazers_count":146,"open_issues_count":9,"forks_count":43,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-08T23:24:09.591Z","etag":null,"topics":["country","country-codes","example","ios","ios-swift","nikkovios","phone","picker","swift"],"latest_commit_sha":null,"homepage":"https://cocoapods.org/pods/NKVPhonePicker","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NikKovIos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-24T23:06:47.000Z","updated_at":"2025-08-27T20:17:24.000Z","dependencies_parsed_at":"2022-09-04T01:21:55.334Z","dependency_job_id":null,"html_url":"https://github.com/NikKovIos/NKVPhonePicker","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/NikKovIos/NKVPhonePicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikKovIos%2FNKVPhonePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikKovIos%2FNKVPhonePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikKovIos%2FNKVPhonePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikKovIos%2FNKVPhonePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NikKovIos","download_url":"https://codeload.github.com/NikKovIos/NKVPhonePicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NikKovIos%2FNKVPhonePicker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225959,"owners_count":25427017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country","country-codes","example","ios","ios-swift","nikkovios","phone","picker","swift"],"created_at":"2024-10-15T03:42:39.756Z","updated_at":"2025-10-11T22:25:49.516Z","avatar_url":"https://github.com/NikKovIos.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/NikKovIos/NKVPhonePicker/master/RepoAssets/Logo.png\" width=\"400\"/\u003e\n\u003c/p\u003e \n\u003cbr /\u003e\n\n![Platform](https://img.shields.io/badge/platform-ios-blue.svg?style=flat)\n![Swift version](https://img.shields.io/badge/Swift-5-orange.svg?style=flat)\n![License](https://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)  \n[![CocoaPods](https://img.shields.io/cocoapods/v/NKVPhonePicker.svg)](https://cocoapods.org/pods/NKVPhonePicker)\n[![CocoaPods](https://img.shields.io/cocoapods/dm/NKVPhonePicker.svg)](https://cocoapods.org/pods/NKVPhonePicker)\n\n## Preview\n![](https://raw.githubusercontent.com/NikKovIos/NKVPhonePicker/master/RepoAssets/Example.gif)          \u003cimg src=\"https://raw.githubusercontent.com/NikKovIos/NKVPhonePicker/master/RepoAssets/Screenshot_two.jpg\" height=\"480\"/\u003e  \n\u003cimg src=\"https://raw.githubusercontent.com/NikKovIos/NKVPhonePicker/master/RepoAssets/Screenshot_one.png\" height=\"400\"/\u003e          \u003cimg src=\"https://raw.githubusercontent.com/NikKovIos/NKVPhonePicker/master/RepoAssets/Screenshot_three.png\" height=\"400\"/\u003e \n\n\n## Installation\n\nNKVPhonePicker is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'NKVPhonePicker'\n```\nAlso you can try an example project with \n```ruby\npod try NKVPhonePicker\n```\n*(don't forget to update your cocoapods master repo)*\n\nFor swift 4.2 version use `011f7090e69a8446aadd21531e4b83da745cd2d4` in `master` branch.\n\nIf you're still using Swift 2.x - you can set (The development for swift_2.x is deprecated. Stale version still exists.)\n```ruby\npod 'NKVPhonePicker', :git =\u003e \"https://github.com/NikKovIos/NKVPhonePicker.git\", :branch =\u003e \"Swift_2.x\"\n```\n\n## Usage\n\n1) Make your UITextField a class of NKVPhonePickerTextField\n2) Set its phonePickerDelegate to UIViewController in order to be able of presenting the CountriesViewController\n3) If any troubles - watch an example project.\n\nPlease, make an issue, if you need any features, or have bugs.\n\n## Example\n```swift\ntopTextField.phonePickerDelegate = self\ntopTextField.favoriteCountriesLocaleIdentifiers = [\"RU\", \"ER\", \"JM\"]\ntopTextField.rightToLeftOrientation = true\ntopTextField.shouldScrollToSelectedCountry = false\ntopTextField.flagSize = CGSize(width: 30, height: 50)\ntopTextField.enablePlusPrefix = false\n\n// Setting initial custom country\nlet country = Country.countryBy(countryCode: \"EG\")\ntopTextField.currentSelectedCountry = country\n\n// Setting custom format pattern for some countries\ntopTextField.customPhoneFormats = [\"RU\" : \"# ### ### ## ##\",\n                                   \"GB\": \"## #### #########\"]\n\n// Adding programmatically\nbottomTextField = NKVPhonePickerTextField(frame: CGRect(x: 0, y: 0, width: 0, height: 30))\nbottomTextField.placeholder = \"ex: 03123456\"\nbottomTextField.autocorrectionType = .no\nbottomTextField.phonePickerDelegate = self\nbottomTextField.keyboardType = .numberPad\nbottomTextField.favoriteCountriesLocaleIdentifiers = [\"LB\"]\nbottomTextField.layer.borderWidth = 1\nbottomTextField.layer.borderColor = UIColor.white.cgColor\nbottomTextField.layer.cornerRadius = 5\nbottomTextField.font = UIFont.boldSystemFont(ofSize: 25)\nbottomTextField.textColor = UIColor.white\nbottomTextField.textFieldTextInsets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 0)\nbottomTextField.translatesAutoresizingMaskIntoConstraints = false\n\n// prefilling\nlet source = NKVSource(countryCode: \"ru\")\nbottomTextField.setCurrentCountryInitially = false\nbottomTextField.preFillText(source: source, number: 7999432423)\n```\n\n**Note:** 'In this library used the `TextFieldPatternFormat` lib by Vojta Stavik'\n\n#### TODO:\n- [x] Add example\n- [x] Max numbers count var (can do with custom pattern)\n- [x] Patterns for each country\n\n## Checkout my other works\n\n- [x] https://github.com/Yummypets/YPImagePicker - Instagram like image picker. The project in cooperative with [s4cha](https://github.com/s4cha)\n- [x] https://github.com/NikKovIos/SDWebImage-CircularProgressView - extension to change progress bar on images for SDWebImage\n- [x] https://github.com/NikKovIos/ObjectMapper_RealmSwift - extension to add Realm object support for ObjectMapper\n\n\u003ca href=\"http://nik-kov.com\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Yummypets/YPImagePicker/master/Images/coreTeam2.png\" width=\"70px\"\u003e\n\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikkovios%2Fnkvphonepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikkovios%2Fnkvphonepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikkovios%2Fnkvphonepicker/lists"}