Skip to content

Countries Calling Codes Use when Registring a phone number and want to get a country code Search Feature by code and By Country Name. Code will return you Country Name, Flag Image, dial code, and country code. lightweight and easy to use

License

Notifications You must be signed in to change notification settings

imranrasheeddeveloper/CallingCodesKit

Repository files navigation

CallingCodesKit

CI Status Version License Platform

Example

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

Requirements

1-Go to Pods
2-Select Target CallingCodesKit
3-Click on build Phase
4-Click on Copy Bundel Resources
5-click on + Button
6- In CallingCodesKit Section You can find out Resources folder
7- Select CountryCallingCode.json
8-click add
for more Details please See the video in Usage Section

Installation

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

pod 'CallingCodesKit'

Usage

Setup

import CallingCodesKit
 
class ViewController: UIViewController, callingCodeData
   
  {
    @IBOutlet weak var textLabel : UILabel!
    func countryCodeAndFlag(name: String, flag: String, code: String, dialCode: String) {
        textLabel.text = "\(flag) \(name) \(dialCode)"
    }
    @objc func callingCodeVC(){
        let vc = CallingCodesVC()
        vc.delegate = self
        navigationController?.pushViewController(vc, animated: true)
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        let tap = UITapGestureRecognizer(target: self, action: #selector(callingCodeVC))
        textLabel.addGestureRecognizer(tap)    
    }
 }

Screenshot

IMG_9763

Author

imranrasheeddeveloper, [email protected]

License

CallingCodesKit is available under the MIT license. See the LICENSE file for more info.

About

Countries Calling Codes Use when Registring a phone number and want to get a country code Search Feature by code and By Country Name. Code will return you Country Name, Flag Image, dial code, and country code. lightweight and easy to use

Resources

License

Stars

Watchers

Forks

Packages

No packages published