Latest 0.1.0
Homepage https://github.com/hdoria/HDNTextField
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform
Carthage compatible

Requirements

  • iOS 8+

Example

iPhone

How to Use

Using from Storyboard

Xcode

To run the example project, clone the repo, and run pod install from the Example directory first.

Code

let textField = HDNTextField()

Properties


// This property applies a padding to the placeholder. Ex: CGPoint(x: 10, y: 0).
textField.placeholderInsets = CGPoint(x: 10, y: 0)

// The color for the placeholder when the Textfield is inactive.
textField.placeholderInactiveColor = .lightGrayColor() 

// The color for the placeholder when the Textfield is active.
textField.placeholderActiveColor = .blueColor()

// The background color for the placeholder.
textField.placeholderBackgroundColor = .clearColor()

// The background color for the textfield when it's active.
textField.textFieldActiveBackgroundColor = .clearColor()

//  The background color for the textfield when it's inactive.
textField.textFieldInactiveBackgroundColor = .clearColor() 

// The color for the text when the textfield is inactive.
textField.textInactiveColor = .blackColor() 

// The color for the text when the textfield is active.
textField.textActiveColor: UIColor = .blackColor()

// The corner radius for the textfield as a whole.
textField.textFieldCornerRadius = 3.0

// This property defines the size of the editable area.
textField.textFieldInsets = CGPoint(x: 10, y: 0)

// The color of the border when the textfield is not active.
textField.borderInactiveColor = UIColor.lightGrayColor() 

// The color of the border when it is active.
textField.borderActiveColor: UIColor = UIColor.blueColor() 

Installation

Using CocoaPods

HDNTextField is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "HDNTextField"

Using Carthage

Add the following to your Cartfile:

github "hdoria/HDNTextField"

Author

Hugo Doria, [email protected]

License

HDNTextField is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "HDNTextField",
    "version": "0.1.0",
    "summary": "Customizable UITextField (with Storyboard support)",
    "description": "Customizable UITextField (with Storyboard support). Written in Swift.",
    "homepage": "https://github.com/hdoria/HDNTextField",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Hugo Doria": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hdoria/HDNTextField.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HDNTextField/Classes/**/*"
}

Pin It on Pinterest

Share This