Latest 0.2.0
Homepage https://github.com/Dwarven/PhoneCountryCodePicker
License MIT
Platforms ios 7.0
Dependencies Phone-Country-Code-and-Flags
Authors

Build Status
CocoaPods Compatible
Platform
Twitter
License

An iOS tableview picker for PhoneCountryCode

Preview

PhoneCountryCodePicker
PhoneCountryCodePicker
PhoneCountryCodePicker

Podfile

To integrate PhoneCountryCodePicker into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'PhoneCountryCodePicker'

How to use

#import "PCCPViewController.h"

//first
NSDictionary * countryDic = [PCCPViewController infoFromSimCardAndiOSSettings];
//or
NSDictionary * countryDic = [PCCPViewController infoForPhoneCode:86]; //86 just for China

UIImage * flag = [PCCPViewController imageForCountryCode:countryDic[@"country_code"]];
NSLog(@"%@", countryDic);

//second
PCCPViewController * vc = [[PCCPViewController alloc] initWithCompletion:^(id countryDic) {
    NSLog(@"%@", countryDic);
    UIImage * flag = [PCCPViewController imageForCountryCode:countryDic[@"country_code"]];
}];
[vc setIsUsingChinese:YES or NO];
UINavigationController *naviVC = [[UINavigationController alloc] initWithRootViewController:vc];
[self presentViewController:naviVC animated:YES completion:NULL];

Latest podspec

{
    "name": "PhoneCountryCodePicker",
    "version": "0.2.0",
    "summary": "An iOS tableview picker for PhoneCountryCode.",
    "homepage": "https://github.com/Dwarven/PhoneCountryCodePicker",
    "platforms": {
        "ios": "7.0"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dwarven": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Dwarven/PhoneCountryCodePicker.git",
        "tag": "0.2.0",
        "submodules": true
    },
    "source_files": "PhoneCountryCodePicker/*.{h,m}",
    "dependencies": {
        "Phone-Country-Code-and-Flags": []
    }
}

Pin It on Pinterest

Share This