https://github.com/pcjbird/qpdialcodepickerview
International Dial Code Picker View for Country or Area 国家或地区国际区号选择器
https://github.com/pcjbird/qpdialcodepickerview
area calling code country country-flags dail emoji flag international picker
Last synced: 12 days ago
JSON representation
International Dial Code Picker View for Country or Area 国家或地区国际区号选择器
- Host: GitHub
- URL: https://github.com/pcjbird/qpdialcodepickerview
- Owner: pcjbird
- License: mit
- Created: 2017-06-29T09:50:31.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-04T01:58:08.000Z (almost 6 years ago)
- Last Synced: 2025-03-24T18:44:57.737Z (29 days ago)
- Topics: area, calling, code, country, country-flags, dail, emoji, flag, international, picker
- Language: Objective-C
- Homepage:
- Size: 7.28 MB
- Stars: 19
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://travis-ci.org/pcjbird/QPDialCodePickerView)
[](http://cocoadocs.org/docsets/QPDialCodePickerView/)
[](http://cocoadocs.org/docsets/QPDialCodePickerView/)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
[](https://github.com/pcjbird/QPDialCodePickerView)
[](https://github.com/pcjbird/QPDialCodePickerView/releases)
[](https://github.com/pcjbird/QPDialCodePickerView/releases)
[](https://pcjbird.github.io)# QPDialCodePickerView
### International Dial Code Picker View for Country or Area 国家或地区国际区号选择器
## 特性 / Features1.自定义确定按钮背景颜色。
2.自定义确定按钮标题。
3.支持多种地区名称显示格式:根据当前地区本地化所有地区名称/根据地区自身本地化地区名称/根据美国 (US) 地区本地化所有地区名称。
4.可配置是否显示灰色背景蒙版。
5.可配置是否显示圆角。
6.默认按钮“确定”已经国际化,请确保主工程项目支持该语言国际化选项,在项目 `PROJECT` - `Localizations` 中添加。
7.当前地区及当前时区的地区会显示在选择器的最前面。
## 演示 / Demo
![]()
![]()
## 安装 / Installation
方法一:直接下载, 打开工作区 `QPDialCodePickerView.xcworkspace`, 选择 Target `QPDialCodePickerView-Universal`进行编译,在根目录下的 `product` 目录下会生成 `QPDialCodePickerView.framework` 和 `QPDialCodePickerView.bundle`, 将这两个文件添加到您的项目中即可。
方法二:`QPDialCodePickerView` is available through CocoaPods. To install it, simply add the following line to your Podfile:
```
pod "QPDialCodePickerView"
```方法三: 使用Carthage安装
`Cartfile`如下:
```
github "pcjbird/QPDialCodePickerView"
```## 使用 / Usage
```
__weak typeof (UIButton*) weakBtn = self.btnDialCode;
QPDialCodePickerView *pickerView = [[QPDialCodePickerView alloc] initWithAreaFormat:QPDialCodeAreaNameFormatCurrentLocale complete:^(QPDialCodeObject *item) {
[weakBtn setTitle:[NSString stringWithFormat:@"+%@", item.dial_code] forState:UIControlStateNormal];
}];
pickerView.roundCorner = YES;
[pickerView show];
```## 关注我们 / Follow us
[](https://twitter.com/intent/tweet?text=https://github.com/pcjbird/QPDialCodePickerView)
[](https://twitter.com/pcjbird)