STPFormTextFieldContainer
Objective-C
@protocol STPFormTextFieldContainer <NSObject>
Swift
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 [UIFont preferredFontForTextStyle:UIFontTextStyleBody].
Set this property to nil to reset to the default.
Declaration
Objective-C
@property (nonatomic, copy, null_resettable) UIFont *formFont;
Swift
var formFont: UnsafeMutablePointer<Int32>! { get set }
-
The text color to be used when entering valid text. Default is [UIColor labelColor] on iOS 13.0 and later an [UIColor darkTextColor] on earlier versions.
Set this property to nil to reset to the default.
Declaration
Objective-C
@property (nonatomic, copy, null_resettable) UIColor *formTextColor;
Swift
var formTextColor: UnsafeMutablePointer<Int32>! { get set }
-
The text color to be used when the user has entered invalid information, such as an invalid card number.
Default is [UIColor redColor]. Set this property to nil to reset to the default.
Declaration
Objective-C
@property (nonatomic, copy, null_resettable) UIColor *formTextErrorColor;
Swift
var formTextErrorColor: UnsafeMutablePointer<Int32>! { get set }
-
The text placeholder color used in each child field.
This will also set the color of the card placeholder icon.
Default is [UIColor placeholderTextColor] on iOS 13.0 and [UIColor lightGrayColor] on earlier versions. Set this property to nil to reset to the default.
Declaration
Objective-C
@property (nonatomic, copy, null_resettable) UIColor *formPlaceholderColor;
Swift
var formPlaceholderColor: UnsafeMutablePointer<Int32>! { 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
Objective-C
@property (nonatomic, copy, null_resettable) UIColor *formCursorColor;
Swift
var formCursorColor: UnsafeMutablePointer<Int32>! { get set }
-
The keyboard appearance for the field.
Default is UIKeyboardAppearanceDefault.
Declaration
Objective-C
@property (nonatomic) UIKeyboardAppearance formKeyboardAppearance;
Swift
var formKeyboardAppearance: Int32 { get set }