GiniMerchantConfiguration
public final class GiniMerchantConfiguration : NSObject
The GiniMerchantConfiguration
class allows customizations to the look of the Gini Merchant SDK.
If there are limitations regarding which API can be used, this is clearly stated for the specific attribute.
Note
Text can also be set by using the appropriate keys in aLocalizable.strings
file in the projects bundle.
The library will prefer whatever value is set in the following order: attribute in configuration,
key in strings file in project bundle, key in strings file in GiniMerchant
bundle.
Note
Images can only be set by providing images with the same filename in an assets file or as individual files in the projects bundle. The library will prefer whatever value is set in the following order: asset file in project bundle, asset file inGiniMerchant
bundle. See the avalible images for overriding in GiniImages.xcassets
.
-
Singleton to make configuration internally accessible in all classes of the Gini Merchant SDK.
Declaration
Swift
public static var shared: GiniMerchantConfiguration
-
Returns a
GiniMerchantConfiguration
instance which allows to set individual configurations to change the look and feel of the Gini Merchant SDK.Declaration
Swift
public override init()
Return Value
Instance of
GiniMerchantConfiguration
.
-
Height of the buttons from the Payment Component View
Declaration
Swift
public var paymentComponentButtonsHeight: CGFloat { get set }
-
Set to
false
to hide the payment review screen and jump straight to paymentDeclaration
Swift
public var showPaymentReviewScreen: Bool
-
A configuration that defines the appearance of the primary button, including its background color, border color, title color, shadow color, corner radius, border width, shadow radius, and whether to apply a blur effect. It is used for buttons on different UI elements: Payment Component View, Payment Review Screen.
Declaration
Swift
public lazy var primaryButtonConfiguration: ButtonConfiguration { get set }
-
A configuration that defines the appearance of the secondary button, including its background color, border color, title color, shadow color, corner radius, border width, shadow radius, and whether to apply a blur effect. It is used for buttons on different UI elements: Payment Component View.
Declaration
Swift
public lazy var secondaryButtonConfiguration: ButtonConfiguration { get set }
-
A default style configuration that defines the appearance of the text field, including its background color, border color, text color, corner radius, border width and the placeholder foreground color. It is used for input text fields on Payment Review Screen.
Declaration
Swift
public lazy var defaultStyleInputFieldConfiguration: TextFieldConfiguration { get set }
-
A error style configuration that defines the appearance of the text field, including its background color, border color, text color, corner radius, border width and the placeholder foreground color. It is used for input text fields on Payment Review Screen.
Declaration
Swift
public lazy var errorStyleInputFieldConfiguration: TextFieldConfiguration { get set }
-
A selection style configuration that defines the appearance of the text field, including its background color, border color, text color, corner radius, border width and the placeholder foreground color. It is used for input text fields on Payment Review Screen.
Declaration
Swift
public lazy var selectionStyleInputFieldConfiguration: TextFieldConfiguration { get set }
-
Allows setting a custom font for specific text styles. The change will affect all screens where a specific text style was used.
Declaration
Swift
public func updateFont(_ font: UIFont, for textStyle: UIFont.TextStyle)
Parameters
font
Font that is going to be assosiated with specific text style. You can use scaled font or scale your font with our util method
UIFont.scaledFont(_ font: UIFont, textStyle: UIFont.TextStyle)
textStyle
Constants that describe the preferred styles for fonts. Please, find additional information here
-
Undocumented
Declaration
Swift
public func font(for textStyle: UIFont.TextStyle) -> UIFont