Latest 1.0.1
License MIT
Platforms ios 8.0
Frameworks UIKit

CI Status
Swift 4.0


Alt Text

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


Swift version 4.0+

Xcode 9.0+


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

pod 'FloatableTextField'


  1. Add a TextField in your viewcontroller view.
  2. Set the class for the TextField to FloatableTextField
  3. Create an outlet for the textField in your viewcontroller class
@IBOutlet weak var floatTextField: FloatableTextField!


FloatableTextFieldDelegate is similar as UITextFieldDelegate.

floatTextField.floatableDelegate = self

Set State Icon

In order to enable the state icon, add the Footer Image as defaultImage.png in yout Attribute Inspector.

Set State message

func setState(_ state: State, with message: String = "")

For Default Message

floatTextField.setState(.DEFAULT, with: "Default State Message")

Enable State Button Action

You can configure state button action to display your own info or popups.

floatTextField.onStateButtonClick = {
// Action

Enable DropDown

To enable DropDown you jst have to set the Is DropDown Enbaled to Yes in your attribute inspector And configure the dropDown Action as following in your view controller

floatTextField.onDropdownClick = {
    // Action


prashantLalShrestha, [email protected]


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

Latest podspec

    "name": "FloatableTextField",
    "version": "1.0.1",
    "swift_version": "4.0",
    "summary": "A beautiful Custom TextField designed for forms and login in iOS Apps.",
    "description": "It is a custom UItextField with the addition of animations, state indicator, messages label and animated placeholders.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "prashantLalShrestha": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "platforms": {
        "ios": "8.0"
    "source_files": "FloatableTextField/Classes/**/*",
    "resource_bundles": {
        "FloatableTextField": [
    "frameworks": "UIKit"

Pin It on Pinterest

Share This