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:

GuideWhy
iOS SDKSurfaces, 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.

GroupParameters
Modemode: .light, .dark
ColourscolorTextOverride, colorLabelOverride, colorPlaceholderOverride, colorErrorOverride, colorFocusOverride, colorBackgroundOverride, colorBorderOverride, surfaceColorOverride
TypographyfontFamily, fontSizeBase, fontSizeLabel, lineHeightBase, lineHeightLabel, fontWeightBase, fontWeightLabel
GeometryborderRadius, borderWidth, spacingUnit, paddingHorizontal, paddingVertical, spacingLabel, spacingError, iconSize, controlMinHeight
IconsInitializer
RevealWirexRevealIcons(copy:copied:)
CollectWirexCollectIcons(visa:mastercard:)
3-D SecureWirexThreeDSIcons(close:)

Strings

TypeContents
WirexRevealStringsfieldLabels, maskedPlaceholder (plain fields), maskedSegmentGlyph (every PIN cell while masked, default *), copy, copied
WirexCollectStringsLabels, placeholders, an error closure per field and a brandName closure
WirexThreeDSStringsWirexThreeDSStrings(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))
TypeDescription
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

SurfaceHeight source
Reveal rowWirexRevealFieldView.naturalHeight or intrinsicContentSize
Collect formWirexCollectForm.naturalHeight
Apple Pay checkout.naturalHeight event

Apply the reported height instead of hardcoding it. A box shorter than the content clips the value.


Did this page help you?