Latest 1.0
Homepage https://github.com/mrazam110/MRTextField
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit
Authors

MRTextField

License
Platform
Version

Screenshot
Screenshot

Requirements

  • iOS 8.0+
  • ARC

Installation

From CocoaPods:

# For Latest release in cocoapods
pod 'MRTextField'

Without CocoaPods:

  1. Why not CocoaPods?
  2. Drag all .swift file to your project

Quick Tips

You can use IBDesignable

Step 1. Drag and Drop the UITextField

Step 2. In Identity Text, in Custom class, change UITextField to MRTextField

Step 3. In Attributes Inspector, you can view properties

Properties:

Image Icon: Image Icon on left side, Like username icon etc

Drop Down Icon: Dropdown Icon on right side, Like dropdown icon etc

Highlight Line Color: UIColor UIColor.greenColor()

Line Color: UIColor default: UIColor.lightGrayColor()

Line Height: CGFloat default: 1.0

Highlight Animation: Bool default: True

Text Color Place Holder: UIColor default: UIColor.lightGrayColor()

Text Size Place Holder: CGFloat default: 12.0

For changing the style of Text Field

Set Value of Style to 0 (LINE) or 1 (SQUARE BRACKET at the Bottom)

and ENJOY!!

You can use in code

All the properties will work same as the 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

Questions & Help

Use Issues for that. Before asking a question, see if it has already been answered

NOTE: Please try to avoid emailing me with questions. I prefer to keep questions and their answers open-source

License

MRTextField is released under MIT License

Please provide attribution, it is greatly appreciated

Latest podspec

{
    "name": "MRTextField",
    "platforms": {
        "ios": "9.0"
    },
    "summary": "Customized UITextField for iOS Developers",
    "requires_arc": true,
    "version": "1.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Muhammad Raza Master": "[email protected]"
    },
    "homepage": "https://github.com/mrazam110/MRTextField",
    "source": {
        "git": "https://github.com/mrazam110/MRTextField.git",
        "tag": "1.0"
    },
    "frameworks": "UIKit",
    "source_files": "MRTextField/**/*.{swift}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This