Customizing SDK Theme
In order to enhance the user experience on your application, you can customize the SDK theme customization, such as changing the instruction guidance string, text area instruction, and the face area overlay color.
You can provide some customization by defining certain variables in your code. Here are some examples to define the customization for the instruction guidance string, text area instruction, and the face area overlay color.
To change the instruction guidance string you can add some variables by overriding the defined override variable below:
SDKCOntroller?.instructionStart: String = "Posisikan wajah anda kedalam frame"
SDKCOntroller?.instructionFinished: String = "Selesai"
SDKCOntroller?.instructionEyeBlink: String = "Kedipkan kedua mata"
SDKCOntroller?.instructionLeftEyeBlink: String = "Kedipkan mata kiri"
SDKCOntroller?.instructionRightEyeBlink: String = "Kedipkan mata kanan"
SDKCOntroller?.instructionLeftOrientation: String = "Tolehkan kepala ke kiri"
SDKCOntroller?.instructionRightOrientation: String = "Tolehkan kepala ke kanan"
SDKCOntroller?.instructionNodUp: String = "Anggukkan kepala ke atas"
SDKCOntroller?.instructionNodDown: String = "Anggukkan kepala ke bawah"
SDKCOntroller?.instructionSmile: String = "Tersenyum dengan kedua mata terbuka"
To change the face overlay color you can add an override variable
overlayColor
and to change the guidance text color you can add an override variable guidanceTextColor
. Check the UIColor on iOS for the color reference.SDKController?.overlayColor = UIColor(white: 0, alpha: 0.7)
SDKController?.guidanceTextColor = UIColor(black: 0, alpha: 0.7)
// You can start Nodeflux Liveness SDK via button or any other screen lifecycle
@IBAction func startSDK(_ sender: UIButton){
SDKController = SDKViewController(accessKey: self.accessKey, secretKey: self.secretKey, submissionToken: self.submissionToken ?? "")
SDKController?.delegate = self
//overlay face guidance color
SDKController?.overlayColor = UIColor(white: 0, alpha: 0.7)
//overlay Guidance Text/Instruction Text Color
SDKController?.guidanceTextColor = UIColor(white: 0, alpha: 0.7)
//Guidance Text String
SDKCOntroller?.instructionStart: String = "Posisikan wajah anda kedalam frame"
SDKCOntroller?.instructionFinished: String = "Selesai"
SDKCOntroller?.instructionEyeBlink: String = "Kedipkan kedua mata"
SDKCOntroller?.instructionLeftEyeBlink: String = "Kedipkan mata kiri"
SDKCOntroller?.instructionRightEyeBlink: String = "Kedipkan mata kanan"
SDKCOntroller?.instructionLeftOrientation: String = "Tolehkan kepala ke kiri"
SDKCOntroller?.instructionRightOrientation: String = "Tolehkan kepala ke kanan"
SDKCOntroller?.instructionNodUp: String = "Anggukkan kepala ke atas"
SDKCOntroller?.instructionNodDown: String = "Anggukkan kepala ke bawah"
SDKCOntroller?.instructionSmile: String = "Tersenyum dengan kedua mata terbuka"
self.present(SDKController!,animated:true)
}
Last modified 10mo ago