STPFormTextFieldContainer

@objc
public protocol STPFormTextFieldContainer : NSObjectProtocol

STPFormTextFieldContainer is a protocol that views can conform to to provide customization properties for the field form views that they contain.

  • The font used in each child field. Default is .body.

    Declaration

    Swift

    dynamic var formFont: UIFont { get set }
  • The text color to be used when entering valid text. Default is .label on iOS 13.0 and later and .darkText on earlier versions.

    Declaration

    Swift

    dynamic var formTextColor: UIColor { get set }
  • The text color to be used when the user has entered invalid information, such as an invalid card number. Default is .red.

    Declaration

    Swift

    dynamic var formTextErrorColor: UIColor { get set }
  • The text placeholder color used in each child field. This will also set the color of the card placeholder icon. Default is .placeholderText on iOS 13.0 and .lightGray on earlier versions.

    Declaration

    Swift

    dynamic var formPlaceholderColor: UIColor { get set }
  • The cursor color for the field. This is a proxy for the view’s tintColor property, exposed for clarity only (in other words, calling setCursorColor is identical to calling setTintColor).

    Declaration

    Swift

    dynamic var formCursorColor: UIColor { get set }
  • The keyboard appearance for the field. Default is .default.

    Declaration

    Swift

    dynamic var formKeyboardAppearance: UIKeyboardAppearance { get set }