Appearance and Strings
WirexAppearance, icons, copy and sizing for the iOS SDK's reveal, collect, 3DS and Apple Pay surfaces.
Before You Start
Read the following guides before proceeding:
| Guide | Why |
|---|---|
| iOS SDK | Surfaces, isolation model and flows |
Overview
Every surface takes an appearance object and a strings object. The SDK ships no copy — your app supplies
every word the views draw. One WirexAppearance styles Reveal, Collect and 3-D Secure; the wallet checkout
takes CSS variables.
Card Surfaces
import UIKit
import WirexMobileSDK
func styledRow(session: WirexRevealSession) -> WirexRevealFieldView {
let appearance = WirexAppearance(mode: .dark, colorTextOverride: .white, colorFocusOverride: .systemBlue,
fontFamily: "Inter", fontSizeBase: 17, borderRadius: 12)
let strings = WirexRevealStrings(fieldLabels: [.pan: "Card number", .cvv: "CVV"],
maskedPlaceholder: "••••", maskedSegmentGlyph: "*", copy: "Copy", copied: "Copied")
return WirexRevealFieldView(session: session, field: .pan, appearance: appearance, strings: strings)
}WirexAppearance is a memberwise struct with every parameter defaulted. setAppearance(_:) /
apply(appearance:) restyle a live view.
| Group | Parameters |
|---|---|
| Mode | mode: .light, .dark |
| Colours | colorTextOverride, colorLabelOverride, colorPlaceholderOverride, colorErrorOverride, colorFocusOverride, colorBackgroundOverride, colorBorderOverride, surfaceColorOverride |
| Typography | fontFamily, fontSizeBase, fontSizeLabel, lineHeightBase, lineHeightLabel, fontWeightBase, fontWeightLabel |
| Geometry | borderRadius, borderWidth, spacingUnit, paddingHorizontal, paddingVertical, spacingLabel, spacingError, iconSize, controlMinHeight |
| Icons | Initializer |
|---|---|
| Reveal | WirexRevealIcons(copy:copied:) |
| Collect | WirexCollectIcons(visa:mastercard:) |
| 3-D Secure | WirexThreeDSIcons(close:) |
Strings
| Type | Contents |
|---|---|
WirexRevealStrings | fieldLabels, maskedPlaceholder (plain fields), maskedSegmentGlyph (every PIN cell while masked, default *), copy, copied |
WirexCollectStrings | Labels, placeholders, an error closure per field and a brandName closure |
WirexThreeDSStrings | WirexThreeDSStrings(title:close:loading:) |
Apple Pay Checkout
let appearance = WirexWalletAppearance(theme: .dark, variables: ["--wx-accent": "#0057FF"])
let branding = WirexWalletBranding(logo: .hidden, processingDisclosurePartnerName: "Acme")
let buttons = WirexWalletButtons(applePay: .init(style: .black, type: .topUp))| Type | Description |
|---|---|
WirexWalletAppearance(theme:variables:) | CSS variables passed to the checkout |
WirexWalletBranding(logo:processingDisclosurePartnerName:privacyUrl:) | Logo, processing disclosure, privacy URL |
WirexWalletButtons(applePay:) | Apple Pay button style: black, white, whiteOutline; type: plain, topUp, buy |
Sizing
| Surface | Height source |
|---|---|
| Reveal row | WirexRevealFieldView.naturalHeight or intrinsicContentSize |
| Collect form | WirexCollectForm.naturalHeight |
| Apple Pay checkout | .naturalHeight event |
Apply the reported height instead of hardcoding it. A box shorter than the content clips the value.
Updated about 3 hours ago
Did this page help you?

