FUIBarcodeScanner
public protocol FUIBarcodeScanner
Protocol to interact with a Barcode Scanner.
The FUIBarcodeScanner
protocol provides properties to configure the barcode scanner.
A barcode scanner can automatically scan for 1D and 2D codes using the device’s camera.
You can retrieve a Scanner instance through the UIViewController
that host the barcode scanner.
Currently, there are two scanner controller in SAPFiori:
-
The
FUIBarcodeScanMode
for thisBarcodeScanner
.Declaration
Swift
var scanMode: FUIBarcodeScanMode? { get set }
-
A textual prompt text which is displayed in the scanners UI.
Declaration
Swift
var promptMessage: String { get set }
-
The border color of the code indicator UI element inside the scanner UI.
Declaration
Swift
var indicatorBorderColor: CGColor { get set }
-
The border width of the code indicator UI element inside the scanner UI.
Declaration
Swift
var indicatorBorderWidth: CGFloat { get set }
-
A closure to transform the scan result string. The transformed string will be used in function
didReceiveScanResult
ofFUIBarcodeScannerDelegate
. If this property is nil, the result string from scanner will be used in that function directly without transformation.Declaration
Swift
var scanResultTransformer: ((String) -> String)? { get set }