PhoneCountryCodePicker 0.2.0

PhoneCountryCodePicker 0.2.0

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2016年6月

Dwarven 维护。



  • Dwarven

iOS tableview 组件,用于选择手机国家代码

预览

Podfile

要使用 CocoaPods 将 PhoneCountryCodePicker 集成到您的 Xcode 项目中,请在您的 Podfile 中指定它

pod 'PhoneCountryCodePicker'

如何使用

#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];