By bitApp SRL.
An Eureka row that shows a float label, using expandable text view or standard text field. Inspired by FloatLabelRow
To run the example project, clone the repo, and run pod install from the Example directory first.
- iOS 10.0+
- Xcode 10.0+
- Eureka 4.2+
FloatLabelTextInput is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'FloatLabelTextInput'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)
}
}
}Roberto Casula @bitApp SRL
FloatLabelTextInput is available under the Apache License 2.0 license. See the LICENSE file for more info