Customization
The SDK only provides the camera views; you build the rest of the app with your own design.
Document capture screen
Section titled “Document capture screen”With IDCardDetectionWrapperConfiguration:
| Setting | Description |
|---|---|
isHintHidden: Bool |
Hides the document frame hint |
hintColor: CGColor |
Colour of the hint |
hintDisplayRatio: CGFloat |
Size of the hint, between 0 and 1 (e.g. 0.75; 0.6 for the passport) |
hintStrokeWidth: CGFloat |
Line width of the hint |
hintCornerRadius: CGFloat |
Corner radius of the hint |
hintBackgroundColor: UIColor |
Fill inside the hint |
hintVerticalPosition: CGFloat |
Vertical position of the hint |
overlayBackgroundColor: UIColor |
Colour outside the hint |
idPhotoHint: Bool |
Shows where the photo on the document should be |
captureType |
Style of the capture frame (e.g. .DASHED) |
capturedStyle |
Drawing style of the captured document (e.g. .fillStroke) |
capturedStrokeWidth: CGFloat |
Line width of the captured document |
capturedColor: CGColor |
Colour when the document is captured |
uncapturedColor: CGColor |
Colour before the document is captured |
capturedHintColor: CGColor |
Hint colour when the document is captured |
dynamicHintColorWithCapture: Bool |
Changes the hint colour as the document is detected |
dynamicCapturedHintColor, dynamicUncapturedHintColor |
Colours used with dynamicHintColorWithCapture |
conf.hintColor = UIColor.white.withAlphaComponent(0.3).cgColorconf.hintCornerRadius = 23conf.overlayBackgroundColor = UIColor.black.withAlphaComponent(0.5)conf.capturedColor = UIColor.green.withAlphaComponent(0.3).cgColorconf.uncapturedColor = UIColor.red.withAlphaComponent(0.3).cgColorTo capture in landscape, lock the screen to landscape and use a smaller hintDisplayRatio (e.g. 0.5).
Liveness screen
Section titled “Liveness screen”LivenessController.FACE_DETECTION_LAYER_SHAPE = .OVALLivenessController.OUTSIDE_OF_HINT_COLOR = .gray.withAlphaComponent(0.9)
let success = CAShapeLayer()success.strokeColor = UIColor.systemGreen.cgColorsuccess.lineWidth = 5success.fillColor = nilLivenessController.FACE_DETECTION_SUCCESS_LAYER = successSet FACE_DETECTION_FAIL_LAYER and FACE_DETECTION_IDLE_LAYER in the same way for the other states.
Hologram screen
Section titled “Hologram screen”Change the colour outside the frame with HologramController.OUTSIDE_OF_HINT_COLOR and its size with HologramController.HINT_DISPLAY_RATIO.
Every text shown to the user (guidance, error messages, control names) is defined in your app, so you can offer it in Turkish, English or any language. On the NFC sheet the texts come from LocalNFCCommandTransmitter.NFC_START_MESSAGE and the progressMessage and errorMessage closures of PassportReader.