All Projects → AbnerPei → Pptextfield

AbnerPei / Pptextfield

Licence: mit
UITextField各种限制,从此一个属性就能解决!比如:手机号(11位)、密码(只能数字和字母)、最大字符串(是否区分中英文)等等这样的限制,以及实时监测输入文字、结束编辑时回调等。

Projects that are alternatives of or similar to Pptextfield

NSJTextField
A custom textfield with the placeholder displayed on top when text entered.
Stars: ✭ 30 (-11.76%)
Mutual labels:  uitextfield
JDTextField
Animated UITextField enhance UX for the user by giving clarity that they are focused
Stars: ✭ 19 (-44.12%)
Mutual labels:  uitextfield
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+1182.35%)
Mutual labels:  uitextfield
APJTextPickerView
APJTextPickerView is simple implementation for UITextField to use as UIPickerView and UIDatePicker.
Stars: ✭ 21 (-38.24%)
Mutual labels:  uitextfield
TJTextField
UITextField with underline and left image
Stars: ✭ 45 (+32.35%)
Mutual labels:  uitextfield
Anyformatkit
Simple text formatting in Swift
Stars: ✭ 296 (+770.59%)
Mutual labels:  uitextfield
Ragtextfield
Subclass of UITextField that adds an animated placeholder and an optional hint label below the text.
Stars: ✭ 227 (+567.65%)
Mutual labels:  uitextfield
Autocompletefield
Subclass of UITextField that shows inline suggestions while typing.
Stars: ✭ 656 (+1829.41%)
Mutual labels:  uitextfield
LycricsTextView
No description or website provided.
Stars: ✭ 14 (-58.82%)
Mutual labels:  uitextfield
Textfieldcounter
UITextField character counter with lovable UX 💖. No math skills required 🙃.
Stars: ✭ 424 (+1147.06%)
Mutual labels:  uitextfield
TKFormTextField
A thin UITextField subclass with floatable placeholder and secondary text underneath for subtitle or error messages.
Stars: ✭ 17 (-50%)
Mutual labels:  uitextfield
TextInputLayout
The objective of this code is to guide you to create login screen with TextInputLayout in iOS app.
Stars: ✭ 30 (-11.76%)
Mutual labels:  uitextfield
Shsphonecomponent
UITextField and NSFormatter subclasses for formatting phone numbers. Allow different formats for different countries(patterns).
Stars: ✭ 367 (+979.41%)
Mutual labels:  uitextfield
MeasurementTextField
UITextField-based control for (NS)Measurement values input.
Stars: ✭ 16 (-52.94%)
Mutual labels:  uitextfield
Alerts And Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Stars: ✭ 5,267 (+15391.18%)
Mutual labels:  uitextfield
RZColorful
NSAttributedString富文本的方法集合,以及简单优雅的使用其多种属性
Stars: ✭ 53 (+55.88%)
Mutual labels:  uitextfield
CurrencyText
Currency text field formatter available for UIKit and SwiftUI 💶✏️
Stars: ✭ 124 (+264.71%)
Mutual labels:  uitextfield
Crboxinputview
Verify code input view. Support security type for password.短信验证码输入框,支持密文模式
Stars: ✭ 749 (+2102.94%)
Mutual labels:  uitextfield
Mmtextfieldeffects
Extension of TextFieldEffects with Custom UITextFields effects inspired by Codrops, built using Objective-C
Stars: ✭ 619 (+1720.59%)
Mutual labels:  uitextfield
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (+1138.24%)
Mutual labels:  uitextfield

PPTextField来由:

做项目,经常遇到输入内容的各种限制,说来说去,无非都是UITextField的功能,但是各种限制,不同公司不同要求,不同功能不同要求等等,如果每一次都写一大堆的tf代理方法,配合各种限制、截取,未免有些太过于麻烦,可能自己比较懒不想每次都写(其实跟自己做的项目有关:比如整个界面就是添加商品:商品名称(不能输入特殊字符)商品编码(纯数字,必须13位)商品价格(第一个字符不能为0,一个小数点,保留2位等) and so on !),我就想着怎么用一个属性就可以做到,于是在去年10月份写了一个初步的,昨天(2017-03-18)刚好最近项目遇到的比较多,自己就又重新整理优化下,于是有了它的更好的成品。

各种限制,可以灵活组合,如有问题,欢迎提issue!

PPTextField属性S:(个人觉得表格更好)

   属性名   属性介绍   使用注意  
isClearWhileEditing 【1-001】是否当编辑的时候显示clearButton 默认为yes
isSpecialCharacter     【1-002】是否可以输入特殊字符 (默认YES,即可以输入)  特殊字符:除数字、字母、汉字外的字符
canInputCharacters 【1-003】可以输入的字符串数组 【控制不可以输入特殊字符,但是某个或者某些特殊字符又是可以输入的】 ☠☠只有当isSpecialCharacter为NO时,有效☠☠
canotInputCharacters 【1-004】不可以输入的字符串数组 全局限制,没有前提条件
isOnlyNumber     【1-005】是否只能输入数字,默认为NO      
maxNumberCount 【1-006】最多纯数字个数,比如手机11位,商品条码13位等 ☠☠设置了maxNumberCount,就默认 isOnlyNumber = YES☠☠
isPhoneNumber 【1-007】是否是手机号码 ☠☠设置了isPhoneNumber,就默认 isOnlyNumber = YES && maxNumberCount == 11 ,此时maxTextLength和maxCharactersLength无效☠☠
isPrice 【1-008】价格(只有一个".",小数点后保留2位小数) ◥◤首位输入0,第二位不是.,会自动补充.◥◤ ☠☠如果isPrice==YES,则isOnlyNumber=No,即使isOnlyNumber设置为YES也没用,此时canotInputCharacters无效☠☠
isPriceHeaderPoint 【1-009】价格是否允许以“.”开头,默认是不允许,如果允许,请设置为YES ☠☠设置了isPriceHeaderPoint,则isPrice = YES,此时canotInputCharacters无效☠☠
isPassword     【1-010】是不是密码 (默认只能字母和数字)      
canInputPasswords 【1-011】密码可以输入的字符串数组 【控制不可以输入特殊字符,但是某个或者某些特殊字符又是可以输入的】 ☠☠只有当isPassword为YES时,有效 ☠☠
maxTextLength     【1-012】tf.text最大长度(不考虑中英文)      
maxCharactersLength     【1-013】字符串最大长度(一个中文2个字符,一个英文1个字符【中文输入法下的都算中文】)      
ppTextfieldTextChangedBlock     【2-001】文本框字符变动,回调block【实时监测tf的文字】   block回调    
ppTextFieldEndEditBlock 【2-002】结束编辑or失去第一响应,回调block block回调
ppTextFieldReturnTypeBlock 【2-003】键盘右下角returnType点击 block回调

稍后会更新demo示例!!!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].