Skip to content

Repository files navigation

FloatLabelTextInput

CI Status Version License Platform Swift 4.2

By bitApp SRL.

Introduction

An Eureka row that shows a float label, using expandable text view or standard text field. Inspired by FloatLabelRow

Example

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

Requirements

  • iOS 10.0+
  • Xcode 10.0+
  • Eureka 4.2+

Installation

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

pod 'FloatLabelTextInput'

Usage

import Eureka
import FloatLabelTextInput


class ExampleViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        form +++ Section()
            <<< TextFloatLabelRow() {
                $0.title = "Text Field"
                $0.value = "Placeholder"
            }
            <<< IntFloatLabelRow() {
                $0.title = "Int field"
                $0.value = 2017
            }
            <<< PasswordFloatLabelRow() {
                $0.title = "Password field"
                $0.value = "password"
            }
            +++ Section()
            <<< DecimalFloatLabelRow() {
                $0.title = "Scientific style"
                $0.value = 2017
                let formatter = NumberFormatter()
                formatter.locale = .current
                formatter.numberStyle = .scientific
                $0.formatter = formatter
            }
            <<< IntFloatLabelRow() {
                $0.title = "Spell out style"
                $0.value = 2017
                let formatter = NumberFormatter()
                formatter.locale = .current
                formatter.numberStyle = .spellOut
                $0.formatter = formatter
        	}
        	<<< FloatLabelTextViewRow() {
                $0.title = "Text Field"
                $0.textAreaHeight = .dynamic(initialTextViewHeight: 100)
            }
    }

}

Author

Roberto Casula @bitApp SRL

License

FloatLabelTextInput is available under the Apache License 2.0 license. See the LICENSE file for more info

About

An Eureka row that shows a float label, using expandable text view or standard text field

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages