TweePlaceholderTextField

public class TweePlaceholderTextField: UITextField

An object of the class has a customized placeholder label which has animations on the beginning and ending editing.

  • Animation type when a user begins editing.

    • immediately: Sets minimum font size immediately when a user begins editing.
    • smoothly: Sets minimum font size step by step during animation transition when a user begins editing.
    See more

    Declaration

    Swift

    public enum MinimizationAnimationType
  • Default is immediately.

    Declaration

    Swift

    public var minimizationAnimationType: MinimizationAnimationType = .immediately
  • Minimum font size for the custom placeholder.

    Declaration

    Swift

    @IBInspectable public private(set) var minimumPlaceholderFontSize: CGFloat = 12
  • Original (maximum) font size for the custom placeholder.

    Declaration

    Swift

    @IBInspectable public private(set) var originalPlaceholderFontSize: CGFloat = 17
  • Placeholder animation duration.

    Declaration

    Swift

    @IBInspectable public private(set) var placeholderDuration: Double = 0.5
  • Color of custom placeholder.

    Declaration

    Swift

    @IBInspectable public var placeholderColor: UIColor?
  • The styled string for a custom placeholder.

    Declaration

    Swift

    public var attributedTweePlaceholder: NSAttributedString?
  • The string that is displayed when there is no other text in the text field.

    Declaration

    Swift

    @IBInspectable public var tweePlaceholder: String?
  • Custom placeholder label. You can use it to style placeholder text.

    Declaration

    Swift

    public private(set) lazy var placeholderLabel = UILabel()
  • Undocumented

    Declaration

    Swift

    override public func awakeFromNib()