UI Customizations for myPOS Mobile Checkout iOS SDK
This guide explains how to customize the look and feel of the myPOS Mobile Checkout UI in your iOS app. Easily match your brand and create a seamless payment experience for your users.
Why Customize?
Using myPOS Mobile Checkout iOS SDK UI components gives your app:
- Frictionless checkout experience
- Minimized PCI scope
- Built-in security and fraud prevention
- Brand consistency with customizable themes
How to Customize the Payment UI
You can easily match the look and feel of the payment screens to your app by creating a new MobilePaymentTheme object and adjusting its properties.
Default Theme Example
Swift
Swift
var theme = MobilePaymentTheme()
theme.textFieldFont = UIFont.systemFont(ofSize: 14.0)
theme.labelTextColor = UIColor.defaultTextColor
theme.placeholderColor = UIColor.lightGray
theme.barButtonItemColor = UIColor.buttonEnabled
theme.textFieldTextColor = UIColor.defaultTextColor
theme.placeholderFontSize = 13.0
theme.textFieldBorderColor = UIColor.gray.withAlphaComponent(0.3)
theme.navigationTitleColor = UIColor.defaultTextColor
theme.placeholderAlignment = .leftObjective-C
Objective-C
MobilePaymentTheme *theme = [MobilePaymentTheme new];
theme.textFieldFont = [UIFont systemFontOfSize:14.0];
theme.labelTextColor = [UIColor defaultTextColor];
theme.placeholderColor = [UIColor lightGrayColor];
theme.barButtonItemColor = [UIColor buttonEnabled];
theme.textFieldTextColor = [UIColor defaultTextColor];
theme.placeholderFontSize = 13.0;
theme.textFieldBorderColor = [[UIColor grayColor] colorWithAlphaComponent:.3];
theme.navigationTitleColor = [UIColor defaultTextColor];
theme.placeholderAlignment = NSTextAlignmentLeft;Applying Your Custom Theme
Once you’ve set up your theme, apply it like this:
Swift
Swift
MobilePaymentSDK.applyTheme(theme)Objective-C
Objective-C
[MobilePaymentSDK applyTheme:theme];Pro Tip
Need help with SDK methods?
Hold down Option (⌥) and click on any SDK method in Xcode to instantly view quick documentation in the Utilities panel!