Customizing iOS SDK Interface
To customize the Oz Liveness interface, use
OZCustomization
as shown below. For the description of customization parameters, please refer to iOS SDK Methods and Properties.// customization parameters for the toolbar
let toolbarCustomization = ToolbarCustomization(
closeButtonIcon: UIImage(named: "example"),
closeButtonColor: .black.withAlphaComponent(0.8),
titleText: "",
titleFont: .systemFont(ofSize: 18, weight: .regular),
titleColor: .gray,
backgroundColor: .lightGray)
// customization parameters for the center hint
let centerHintCustomization = CenterHintCustomization(
textColor: .white,
textFont: .systemFont(ofSize: 22, weight: .regular),
verticalPosition: 42,
backgroundColor: UIColor.init(hexRGBA: "1C1C1E8F")!,
hideTextBackground: false,
backgroundCornerRadius: 14)
// customization parameters for the center hint animation
let hintAnimationCustomization = HintAnimationCustomization(
hideAnimation: false,
animationIconSize: 80,
toFrameGradientColor: UIColor.red)
// customization parameters for the frame around the user face
let faceFrameCustomization = FaceFrameCustomization(
strokeWidth: 4,
strokeFaceAlignedColor: .green,
strokeFaceNotAlignedColor: .red,
geometryType: .rect(cornerRadius: 10),
strokePadding: 3)
// customization parameters for the SDK version text
let versionCustomization = VersionLabelCustomization(
textFont: .systemFont(ofSize: 12, weight: .regular),
textColor: .gray
)
// customization parameters for the background outside the frame
let backgroundCustomization = BackgroundCustomization(
backgroundColor: .lightGray
)
// customization parameters for the antiscam protection text
let antiscamCustomization: AntiscamCustomization = AntiscamCustomization(
customizationEnableAntiscam: false,
customizationAntiscamTextMessage: "Face recognition",
customizationAntiscamTextFont: UIFont.systemFont(ofSize: 15, weight: .semibold),
customizationAntiscamTextColor: UIColor.black,
customizationAntiscamBackgroundColor: UIColor.init(hexRGBA: "F2F2F7FF")!,
customizationAntiscamCornerRadius: 18,
customizationAntiscamFlashColor: UIColor.init(hexRGBA: "FF453AFF")!)
OZSDK.customization = OZCustomization(toolbarCustomization: toolbarCustomization,
centerHintCustomization: centerHintCustomization,
hintAnimationCustomization: hintAnimationCustomization,
faceFrameCustomization: faceFrameCustomization,
versionCustomization: vesrionCustomization,
backgroundCustomization: backgroundCustomization)