您的位置:首页 > 移动开发 > IOS开发

iOS-国家代码选择功能github开源分享

2016-04-20 10:23 816 查看
三行代码集成国家区号选择功能

功能运行效果如图:



开源链接:

https://github.com/qxuewei/XWCountryCode

使用方法:

1.导入XWCountryCode类

2.在需要选择国家代码的事件中

XWCountryCodeController *CountryCodeVC = [[XWCountryCodeController alloc] init];
//CountryCodeVC.deleagete = self;
//block
[CountryCodeVC toReturnCountryCode:^(NSString *countryCodeStr) {
//在此处实现最终选择后的界面处理
[self.countryCodeLB setText:countryCodeStr];
}];
[self presentViewController:CountryCodeVC animated:YES completion:nil];


界面传值提供了代理和block两种方式,自由选择
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: