测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最后发布 | 2017 年 5 月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Muhammad Raza Master 维护。
#要求
#从 CocoaPods 安装
# For Latest release in cocoapods
pod 'MRTextField'
不使用 CocoaPods
##快速提示
#您可以使用 IBDesignable
步骤 1. 拖放 UITextField
步骤 2. 在身份文本中,在自定义类中,将 UITextField 更改为 MRTextField
步骤 3. 在属性检查器中,您可以查看属性
属性
图标图像:左侧的图像图标,如用户名图标等
下拉图标:右侧的下拉图标,如下拉图标等
高亮显示行颜色:UIColor UIColor.greenColor()
行颜色:UIColor 默认:UIColor.lightGrayColor()
行高:CGFloat 默认:1.0
高亮动画:Bool 默认:True
占位符颜色:UIColor 默认:UIColor.lightGrayColor()
占位符字体大小:CGFloat 默认:12.0
为了更改文本框的样式
将 Style
的值设置为 0(行)或 1(底部中方括号)
然后享受吧!
#您可以在代码中使用
所有属性将根据 UITextField 工作
//For Adding the Drop down Icon:
textField.dropDown = UIImage(named: "")
//For Adding the Image Icon:
textField.iconImage = UIImage(named: "")
// For changing the bottom line color : Default: UIColor.lightGrayColor()
textField.lineColor = UIColor.lightGrayColor()
// For change the Place Holder text color : Default: UIColor.lightGrayColor()
textField.textColorPlaceHolder = UIColor.lightGrayColor()
// For changing the size of Place Holder text : Default: 12.0
textField.textSizePlaceHolder = 12.0
// For changing the bottom line highlight color : Default: UIColor.lightGrayColor()
textField.highlightLineColor = UIColor.greenColor
//For Boldness of Bottom line : Default: 1.0
textField.lineHeight = 1.0
//For Hightlight animation : Default : true
/*True for ON and false for OFF*/
textField.highlightAnimation = true
/* For changing the style of Text Field
.LINE for Line and
.SQAUREBRACKET for different shape at the bottom
by default it is .LINE*/
textField.style = .SQUAREBRACKET
##问题与帮助
请使用 Issues。在提问之前,请查看是否有现成的回答
注意:请尽量避免用邮件向我提问。我更喜欢将问题和它们的答案开源
##许可证
MRTextField
在 MIT 许可证 下发布
请提供归属,这将被非常感激