LOGO

TTextField

TTextField is developed to help developers can initiate a fully standard textfield including title, placeholder and error message in fast and convinient way without having to write many lines of codes

Swift 5.0 Version License Platform Email

Example

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

Requirements

Installation

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

pod 'TTextField'

Usage

import TTextField
  1. Initiate TTextField
let textField = TTextField()
  1. To show title, please input into title property
textField.title = "Email address"
  1. To show the placeholder, please input into placeholder property
textField.placeholder = "Enter your work email address"
  1. To enable/disable underline, please setup into isUnderline property
textField.isUnderline = true
  1. To show error message, please input into errorMessage property
textField.errorMessage = "The e-mail address entered is incorrect"
  1. To change settings more deeply, you can refer to the following functions and properties:

- underlineWidth: CGFloat
- inactiveUnderlineColor: UIColor
- inputRectLeftInset: CGFloat
- extraSpacingTitle: CGFloat
- appearanceFont: AppearanceFont
- errorImage: UIImage
- showsCaret: Bool

- func applyErrorUnderlineStyle()
- func applyNonErrorUnderlineStyle()

til

Requirements

  • iOS 9.3 or later
  • Swift 5.0 or later

Author

fanta1ty, [email protected]

License

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

GitHub

View Github