Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qiubaiying/byphonenumtf
电话号码文本框(A UITextfield of phonenumber)
https://github.com/qiubaiying/byphonenumtf
phone-number textfield
Last synced: about 1 month ago
JSON representation
电话号码文本框(A UITextfield of phonenumber)
- Host: GitHub
- URL: https://github.com/qiubaiying/byphonenumtf
- Owner: qiubaiying
- License: mit
- Created: 2016-12-02T07:39:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T09:36:44.000Z (over 7 years ago)
- Last Synced: 2024-09-15T20:58:52.383Z (2 months ago)
- Topics: phone-number, textfield
- Language: Objective-C
- Homepage:
- Size: 41 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BYPhoneNumTF
这是一个电话号码格式的文本框的框架
## 获取
- CocoaPods$ pod 'BYPhoneNumTF', '~> 1.0.0'
- 手动添加
将 `BYPhoneNumTF` 文件夹中的 `BYPhoneNumTF.h` `BYPhoneNumTF.m` 拖入工程中即可## 使用
- 代码创建
```
@property (nonatomic, strong) BYPhoneNumTF *phoneNumTF;
```
- storyboardstoryboard 中的 `TextField`的 `Class` 类型选择该 **`BYPhoneNumTF`** 即可。
## 效果
当在TextField输入电话号码时,会自动分隔电话号码如:137 9922 2299 或 137-9922-2299
支持重任意位置删除时保持格式不变
效果看图:
![](http://ww2.sinaimg.cn/large/7853084cgw1fa3cqnu8s2g207i0dc4qp.gif)# English Explanation
This is a phone number formatting input Demo, when in the TextField enter the phone number, will automatically separate phone Numbers such as: 137 9922 2299 or 137-9922-2299
## Use
- code
```
@property (nonatomic, strong) BYPhoneNumTF *phoneNumTF;
```
- storyboardThe TextField class BYPhoneNumTF choice in the storyboard.
## Demo Project
To keep the same format when support burden means deleted
Effect of the picture:
![](http://ww2.sinaimg.cn/large/7853084cgw1fa3cqnu8s2g207i0dc4qp.gif)