Latest 0.1.3
Homepage https://github.com/TekysLabPvtLtd/TLFloatLabelTextField
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

A TLFloatLabelTextField is the Swift implementation. UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text.

tlfloattextfielddemo

Example

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

Requirements

Installation

TLFloatLabelTextField is a beautiful, flexible and customizable implementation of the space saving "Float Label Pattern".

You can install the TLFloatLabelField components two ways:

Add ‘TLFloatLabelTextField’ and ‘TLFloatLabelTextView’ files to your project and subclass your textfield and textview in Storyboard with TLFloatLabelTextField and TLFloatLabelTextView.

(or)

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

pod 'TLFloatLabelTextField'

Next, switch to the Attributes Inspector tab and set the necessary attributes to configure your text field or text view. The Placeholder attribute (or Hint in the case of a UITextView) defines the actual title which will be used for your field.

Using TLFloatLabelTextField via code works the same as you would do to set up a UITextField or UITextView instance. Simply create an instance of the class, set the necessary properties, and then add the field to your view.

For TextField

let customTextField = TLFloatLabelTextField(frame:parentView.bounds)
customTextField.placeholder = "Comments"
parentView.addSubview(customTextField)

For TextView

let customTextView = TLFloatLabelTextView(frame:parentView.bounds)
customTextView.placeholder = "Comments"
parentView.addSubview(customTextView)

Credits

This project derives inspiration from JVFloatLabeledTextField project.

Author

Myanamwar, [email protected]

License

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

Latest podspec

{
    "name": "TLFloatLabelTextField",
    "version": "0.1.3",
    "summary": "TLFloatLabelTextField with bottom line for UITextField and UITextView.",
    "description": "A TLFloatLabelTextField is the Swift implementation. UITextField and UITextView subclasses with placeholders along with the bottom line that change into floating labels when the fields are populated with text.",
    "homepage": "https://github.com/TekysLabPvtLtd/TLFloatLabelTextField",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "TekysLabPvtLtd": "[email protected]"
    },
    "source": {
        "git": "https://github.com/TekysLabPvtLtd/TLFloatLabelTextField.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "source_files": "TLFloatLabelTextField/Classes/**/*"
}

Pin It on Pinterest

Share This