On this page

Stuck? Open a support ticket and the barKoder team will help. Open a ticket

iOS API reference

Every method, setting, enum and result of the barKoder iOS SDK, grouped by what you do with it.

The BarkoderView class is a part of the barKoder's iOS Barcode Scanner SDK. It includes methods to manage camera preview and barcode scanning operations. It allows you to set a delegate for preview frames, adjust the zoom factor, check the availability of flash, toggle flash on or off, start and stop the camera, and manage the scanning process. The scanning methods include startScanning, stopScanning, and pauseScanning. The class requires a result delegate for the startScanning method.

The BarkoderConfig class in the barKoder's iOS Barcode Scanner SDK includes various properties and methods to configure the barcode scanning process.

It allows you to enable or disable barcode types, configure the color and width of the location line and region of interest line, and set the background color of the overlay within the Region of Interest.

It also offers options to adjust the scanning session, capture and process image data, display barcode location information, define and retrieve the Region of Interest, set the maximum threads used for decoding, enable pinch-to-zoom feature, and set the resolution for barcode scanning.

Furthermore, the class includes options to enable or disable sound and vibration upon successful decoding, adjust the threshold between duplicate scans, and enable multi-code caching. It also provides methods to export the config to a JSON string.

Scanning & session #

startScanning #

Initiates the barcode scanning process, allowing the application to detect and decode barcodes from the device's camera feed.

@param resultDelegate

Throws Error if BarkoderView config is not set

Swift
@objc public func startScanning(_ resultDelegate: BarkoderResultDelegate) throws

stopScanning #

Halts the barcode scanning process, stopping the camera from capturing and processing barcode information.

Swift
@objc public func stopScanning()

pauseScanning #

Temporarily suspends the barcode scanning process, pausing the camera feed without completely stopping the scanning session.

Swift
@objc public func pauseScanning()


freezeScanning #

Freezes the AR scanning session by capturing a still image from the camera feed while keeping AR overlays visible.

Available only when AR mode is enabled.
Swift
@objc public func freezeScanning()

unfreezeScanning #

Unfreezes a previously frozen AR scanning session and resumes live camera scanning and overlay updates.

Available only when AR mode is enabled.
Swift
@objc public func unfreezeScanning()

setDynamicExposure #

Configures dynamic exposure compensation based on the provided intensity value.

A value between 0 and 10 is expected, where 0 disables dynamic exposure.

Default value is 0 (disabled).
Swift
@objc public func setDynamicExposure(_ intensity: Int)

setVideoStabilization #

Enables or disables video stabilization for the camera preview.

Default value is false.
Swift
@objc public func setVideoStabilization(_ enabled: Bool)

selectVisibleBarcodes #

Selects all barcodes that are currently visible in AR mode and sends them through the BarkoderResultDelegate.

Available only when AR mode is enabled.

Swift
@objc public func selectVisibleBarcodes()

decodingSpeed #

On BarkoderConfig.

Decoding speed profile for barcode scanning. Options: Fast(0), Normal(1), Slow(2), Rigorous(3).

decoderConfig setting
Swift
@objc public var decodingSpeed: DecodingSpeed

matchFilter #

On BarkoderConfig.

Sets a string or regular expression used to match decoded barcode data.

decoderConfig setting
Swift
@objc public var matchFilter: String

dpmMode #

On BarkoderConfig.

Sets whether Direct Part Marking (DPM) mode is enabled. It's available for QR, Micro QR and Data Matrix barcodes. It only works efficiently with small ROI and camera - it is not efficient for images.

decoderConfig setting
Swift
@objc public var dpmMode: Int

setThreadsLimit #

On BarkoderConfig.

Set maximum threads that will be used for the decoding process

Parameter value: [1, max threads available].

Throws Error if input param is greater than maximum threads available on that device

Swift
@objc func setThreadsLimit(_ value: Int) throws

getThreadsLimit #

On BarkoderConfig.

Get maximum threads that are used for the decoding process

Swift
@objc open func getThreadsLimit() -> Int

powerSavingMode #

On BarkoderConfig.

Increasing the level reduces CPU and battery usage by limiting frame processing.

Default value is 0.
0 - Disabled (full performance)
1 - Light saving
2 - Medium saving
3 - High saving
4 - Maximum saving
Swift
 @objc public var powerSavingMode: Int

GetVersion #

On BarkoderConfig.

Swift
@objc public static func GetVersion() -> String


applyConfigSettingsFromTemplate #

On BarkoderHelper.

Apply config params from a pre-defined template

Parameters:

BarkoderConfig configconfig that will be configured
BarkoderConfigTemplate templatetemplate that will be applied on config
finishedThis will be executed when the function is finished
Swift
@objc public static func applyConfigSettingsFromTemplate(_ config: BarkoderConfig,
template: BarkoderConfigTemplate, finished: @escaping (BarkoderConfig) -> Void)

Templates (BarkoderConfigTemplate): .all, .pdf_optimized, .qr, .retail_1d, .industrial_1d, .all_2d, .dpm, .vin, .dotcode, .all_1d, .mrz, .gallery_scan, .composite, .postal_codes, .ar.

applyConfigSettingsFromURL #

On BarkoderHelper.

Retrieve config properties from the URL and apply them in the config that is sent as an input param

Parameters:

BarkoderConfig configthe config parameters that we are using for configuration
filePath urlurl to the JSON file
finishedcallback that will be executed when this function is finished
Swift
@objc public static func applyConfigSettingsFromURL(_ config: BarkoderConfig, url: URL,
finished: @escaping (BarkoderConfig?, Error?) -> Void)

applyConfigSettingsFromFile #

On BarkoderHelper.

Retrieve config properties from the URL and apply them in the config that is sent as an input param

Parameters:

configconfig that will be configured
urlfilePath to the JSON file
finishedcallback that will be executed when this function is finished
Swift
@objc public static func applyConfigSettingsFromFile(_ config: BarkoderConfig, url: String,
finished: @escaping (BarkoderConfig?, Error?) -> Void)

applyConfigSettingsFromJson #

On BarkoderHelper.

Retrieve config properties from a JSON and apply them in the config that is sent as an input param

Parameters:

configconfig that will be configured
jsonDataJSON
finishedcallback that will be executed when this function is finished
Swift
@objc public static func applyConfigSettingsFromJson(_ config: BarkoderSDK.BarkoderConfig, jsonData: Data, finished: @escaping (BarkoderSDK.BarkoderConfig?, (Error)?) -> Void)

configToJSON #

On BarkoderHelper.

Export config that is send as input param to JSON string

Parameter barkoderConfig: config that will be exported.

Returns: JSON string

Swift
@objc public static func configToJSON(_ barkoderConfig: BarkoderConfig) -> String?

Visit our website at https://barkoder.com for detailed information on our products and services. It has resources about our Barcode Reader SDK for iOS applications.

For a quote on implementing our SDK, contact us. We provide detailed pricing based on your needs. We look forward to working with you.

init(licenseKey:licenseCheckHandler:) #

On BarkoderConfig.

Creates a config with your license key. The handler receives the license check: code (0 = valid) and a message. Use it for the view's config and for scanImage: a config made with BarkoderConfig() alone has no decoder.

Swift
@objc convenience public init(licenseKey: String, licenseCheckHandler: @escaping (LicenseCheckResult) -> Void)

Camera #

setPreviewFramesDelegate #

Set camera frames callback if you want to receive the frames/images only without decoding them and do your own work with the frames

Swift
@objc public func setPreviewFramesDelegate(_ delegate:
BarkoderPreviewFramesDelegate?)

setBarkoderPerformanceDelegate #

Set callback for getting fps and dps for checking performance.

@param delegate Callback which returns fps and dps as Float

Swift
@objc public func setBarkoderPerformanceDelegate(_ delegate: BarkoderPerformanceDelegate?)

@objc public protocol BarkoderPerformanceDelegate {
  @objc optional func performanceReceived(fps: Float, dps: Float)
}

setZoomFactor #

Set the zoom factor for the camera preview

If a preview session is already active this zoom factor will be set only for this session, therefore initial zoom will be set

every next preview session is started with this zoom factor

Swift
@objc public func setZoomFactor(_ zoomFactor: Float)

isFlashAvailable #

Check if current mobile device has flash available

Swift
@objc public func isFlashAvailable(_ completion: @escaping(_ flashAvailable: Bool) ->
Void)

setFlash #

Turn flash ON/OFF

If preview session is already active this state will be set only for active session otherwise the initial flash state is set. Every next preview session will be started with this state

@params enabled: [true,false].

Default value is false
Swift
@objc public func setFlash(_ enabled: Bool)

startCamera #

Start the camera preview only, without decoding

Swift
@objc public func startCamera()

setCamera #

Sets which camera (front or back) is used for scanning.

Default camera is the back camera.
Swift
@objc public func setCamera(_ position: BarkoderCameraPosition)

getAvailableCameras #

Mac Catalyst only (on iOS use setCamera): the cameras the Mac has, each as a dictionary with its unique device ID.

Swift
@objc public func getAvailableCameras() -> [[String : Any]]

setCameraById #

Mac Catalyst only: selects a camera by its unique device ID (from getAvailableCameras).

Swift
@objc public func setCameraById(_ cameraId: String)

previewMirrored #

Controls whether the camera preview is horizontally mirrored.

On iOS, this setting affects only the front camera. The back camera is never mirrored.

Default value is true.

Swift
@objc public var previewMirrored: Bool

getMaxZoomFactor #

Asynchronously retrieves the maximum available zoom factor for the current camera.

Swift
@objc public func getMaxZoomFactor(_ completion: @escaping(_ maxZoomFactor: Float) -> Void)

getCurrentZoomFactor #

Gets the current zoom factor if the camera is active, or the intended zoom factor that will be applied when the camera starts.

Swift
@objc public func getCurrentZoomFactor() -> Float

setCentricFocusAndExposure #

Configures the camera to use the center of the viewfinder for focus and exposure.

Default value is false.
Swift
@objc public func setCentricFocusAndExposure(_ enabled: Bool)

locationInPreviewEnabled #

On BarkoderConfig.

Enables or disables the display of barcode location information on the camera preview

Default value is true
Swift
@objc public var locationInPreviewEnabled: Bool

pinchToZoomEnabled #

On BarkoderConfig.

Enables or disables the pinch-to-zoom feature for adjusting the zoom level during barcode scanning.

Default value is false
Swift
@objc public var pinchToZoomEnabled: Bool

barkoderResolution #

On BarkoderConfig.

Retrieve/Sets the resolution for barcode scanning.

It can be HD(High Definition), FHD(Full HD) or UHD(4k)

Default value is BarkoderView.BarkoderResolution.HD
Swift
@objc public var barkoderResolution: BarkoderView.BarkoderResolution

Barcode types #

decoderConfig #

On BarkoderConfig.

Obtain the decoder config object. This object allows you to enable or disable decoders (barcode types) and configure each one individually

Swift
@objc public var decoderConfig: Config? = nil

encodingCharacterSet #

On BarkoderConfig.

Encoding character set used for decoding (e.g. “UTF-8”).

decoderConfig setting
Swift
@objc public var encodingCharacterSet: String

formatting #

On BarkoderConfig.

Formatting type for decoded data. Options: Disabled(0), Automatic(1), GS1(2), AAMVA(3), SADL(4), BCBP(5).

decoderConfig setting
Swift
@objc public var formatting: Formatting

upcEanDeblur #

On BarkoderConfig.

Enables deblurring for UPC/EAN barcodes.

decoderConfig setting
Swift
@objc public var upcEanDeblur: Bool

enableMisshaped1D #

On BarkoderConfig.

Enables detection of misshaped 1D barcodes.

decoderConfig setting
Swift
@objc public var enableMisshaped1D: Bool

enableVINRestrictions #

On BarkoderConfig.

Enables VIN-specific decoding restrictions.

decoderConfig setting
Swift
@objc public var enableVINRestrictions: Bool

enableComposite #

On BarkoderConfig.

Enables composite mode when scanning composite barcodes.

decoderConfig setting
Swift
@objc public var enableComposite: Int

multiPartMerge #

On BarkoderConfig.

Enables merging of multi-part QR codes into a single result (only returns when all parts are found).

decoderConfig setting
Swift
@objc public var multiPartMerge: Bool

setCustomOption #

On BarkoderConfig.

Sets a custom decoder option by key.

decoderConfig setting.Supported options:
“single_line_scan” (1D only): 1 = vertical scan line in the middle, 2 = horizontal scan line in the middle. (scanningIndicator)
“center_only_scan” (1D & 2D): value = center region in %, e.g. 1 = exact center, 10 = 10% center area.
“upce_leading_zero”: 0 = to remove a leading 0 for UPC-E.
“decode_document_image_only”: 1 = capture a document image only (no barcode decoding).
Swift
@objc public func setcustomOption(_ option: String, value: Int32)

setLengthRangeWithMinimum #

Swift
setLengthRangeWithMinimum(_:maximum:)

On BarkoderConfig.

Sets the allowed length range for a particular symbology.

decoderConfig setting.

checksum #

On BarkoderConfig.

Controls checksum validation mode.

decoderConfig setting.StandardChecksum: Disabled / Enabled
Code11Checksum: Disabled / Single / Double
Code39Checksum: Disabled / Enabled
MsiChecksum: Disabled / Mod10 / Mod11 / Mod1010 / Mod1110 / Mod11IBM / Mod1110IBM

Results #

captureImage #

Captures the latest available camera frame and returns it through the BarkoderResultDelegate scanningFinished callback (without decoding barcodes). Must be used after starting the camera with `startScanning()`.

Swift
@objc public func captureImage()

returnOnlyMatchedResults #

On BarkoderConfig.

Sets whether only results matching the configured matchFilter are returned.

decoderConfig setting
Swift
@objc public var returnOnlyMatchedResults: Bool

maximumResultsCount #

On BarkoderConfig.

Maximum number of results returned per scan.

decoderConfig setting
Swift
@objc public var maximumResultsCount: Int

closeSessionOnResultEnabled #

On BarkoderConfig.

Enables or disables the automatic closing of the scanning session upon detecting a barcode result

Default value is true
Swift
@objc public var closeSessionOnResultEnabled: Bool


showDuplicatesLocations #

On BarkoderConfig.

Controls whether duplicate barcode locations are shown on the camera preview when the same code is scanned multiple times.

Default value is true.
Swift
@objc public var showDuplicatesLocations: Bool

imageResultEnabled #

On BarkoderConfig.

Enables or disables the capturing and processing of image data when a barcode is successfully detected.

Image result is received in BarkoderResultDelegate as UIImage

Default value is false
Swift
@objc public var imageResultEnabled: Bool

beepOnSuccessEnabled #

On BarkoderConfig.

Enables or disables the audible beep sound upon successfully decoding a barcode.

Default value is true
Swift
@objc public var beepOnSuccessEnabled: Bool

vibrateOnSuccessEnabled #

On BarkoderConfig.

Enables or disables the device vibration upon successfully decoding a barcode.

Default value is true
Swift
@objc public var vibrateOnSuccessEnabled: Bool

barcodeThumbnailOnResult #

On BarkoderConfig.

Retrieve/Sets whether to enable barcode thumbnail on result.

Default value is true
Swift
@objc public var barcodeThumbnailOnResult: Bool

thresholdBetweenDuplicatesScans #

On BarkoderConfig.

Retrieve/Sets the threshold between duplicate scans

Default value is 5
Swift
@objc public var thresholdBetweenDuplicatesScans: Int

setMulticodeCachingEnabled #

On BarkoderConfig.

Sets whether multi-code caching is enabled

Swift
@objc open func setMulticodeCachingEnabled(_ boolean: Bool)

getMulticodeCachingEnabled #

On BarkoderConfig.

Retrieves whether multi-code caching is enabled

Swift
@objc open func getMulticodeCachingEnabled() -> Bool

setMulticodeCachingDuration #

On BarkoderConfig.

Sets the caching duration (in milliseconds) for multi-code results

Swift
@objc open func setMulticodeCachingDuration(_ value: Int)

getMulticodeCachingDuration #

On BarkoderConfig.

Retrieves the caching duration (in milliseconds) for multi-code results

Swift
@objc open func getMulticodeCachingDuration() -> Int

scanImage #

On BarkoderHelper.

Scan barcode from a bitmap image

Parameters:

imageThe UIImage you want to be scanned
bkdConfigThe configuration to be used for the scanning process
resultDelegateThe location where you will receive the scanned result
Swift
@objc public static func scanImage(_ image: UIImage, bkdConfig: BarkoderConfig,resultDelegate: BarkoderResultDelegate)

scanFromGallery #

On BarkoderHelper.

Opens the device's photo gallery, allowing you to choose an image to be processed for barcode scanning.

@param bkdConfig config that will be used for scanning process
@param resultDelegate where you will receive scanned result

Swift
@objc public static func scanFromGallery(bkdConfig: BarkoderConfig, resultDelegate: BarkoderResultDelegate)

sadlImage(fromExtra:) #

On BarkoderHelper.

Tries to build a UIImage from SADL “ImageRawBase64” / “Image Width” / “Image Height” fields stored in the formattedJSON value inside Barkoder’s decoderResult.extra dictionary. Returns the UIImage if everything parses and decodes correctly, otherwise nil.

Swift
@objc public static func sadlImage(fromExtra extra: [AnyHashable : Any]?) -> UIImage?

Region & overlay #

locationLineColor #

On BarkoderConfig.

Location line color as UIColor

Swift
@objc public var locationLineColor: UIColor

locationLineWidth #

On BarkoderConfig.

Get the location line width as float

Default value is 2.0
Swift
@objc public var locationLineWidth: Float

roiLineColor #

On BarkoderConfig.

Region of interest line color as UIColor

Swift
@objc public var roiLineColor: UIColor

roiLineWidth #

On BarkoderConfig.

Region of interest line width as float

Default value is 2.0
Swift
@objc public var roiLineWidth: Float

roiOverlayBackgroundColor #

On BarkoderConfig.

Sets the background color of the overlay within the Region of Interest (ROI) for barcode scanning on the camera feed.

Swift
@objc public var roiOverlayBackgroundColor: UIColor

scanningIndicatorColor #

On BarkoderConfig.

Color of the scanning indicator as UIColor.

Swift
@objc public var scanningIndicatorColor: UIColor


scanningIndicatorWidth #

On BarkoderConfig.

Scanning indicator line width as Float.

Default value is 2.0
Swift
@objc public var scanningIndicatorWidth: Float


scanningIndicatorAnimation #

On BarkoderConfig.

Scanning indicator animation mode as Int.

Default value is 0.
Swift
@objc public var scanningIndicatorAnimation: Int

scanningIndicatorAlwaysVisible #

On BarkoderConfig.

Sets whether the scanning indicator is always visible on the camera preview.

Default value is false.
Swift
@objc public var scanningIndicatorAlwaysVisible: Bool


locationInImageResultEnabled #

On BarkoderConfig.

Enables or disables the inclusion of barcode location information within the image data result

If enabled, barcode in the result image will be marked

Default value is false
Swift
@objc public var locationInImageResultEnabled: Bool

setRegionOfInterest #

On BarkoderConfig.

Defines the Region of Interest (ROI) on the camera preview for barcode scanning, specifying an area where the application focuses on detecting barcodes.

Swift
@objc open func setRegionOfInterest(_ value: CGRect) throws

getRegionOfInterest #

On BarkoderConfig.

Retrieves the region of interest (ROI)

Default value is CGRect(x: 3, y: 30, width: 94, height: 40)
Swift
@objc open func getRegionOfInterest() -> CGRect

regionOfInterestVisible #

On BarkoderConfig.

Retrieves/Sets the visibility of the Region of Interest (ROI) on the camera preview

Default value is true
Swift
@objc public var regionOfInterestVisible: Bool

roiCenterMark #

On BarkoderConfig.

Sets the visual marker displayed at the center of the scanner's Region of Interest (ROI).

Available BarkoderRoiCenterMark modes:
none - No center mark is displayed.
crosshair - Displays a crosshair at the center of the ROI.

point - Displays a point at the center of the ROI.

Swift
@objc public var roiCenterMark: BarkoderRoiCenterMark

AR mode #

resetARCache #

Clears all cached barcode results from the current AR scanning session.

Available only when AR mode is enabled.

Swift
@objc public func resetARCache()


arConfig #

On BarkoderARConfig.

Configuration options for AR barcode detection and overlay behavior.

Swift
@objc public var arConfig: BarkoderARConfig

arMode #

On BarkoderARConfig.

Defines the overall AR behavior mode (interactive, non-interactive, match filter, or disabled).

Default value is off.
Swift
@objc public var arMode: BarkoderARMode

returnOnlyMatchedResults #

On BarkoderARConfig.

Controls whether only matched results are returned.

If false, all detected results are returned, while unmatched results have isMatched set to false.
This option only applies when arMode == .matchFilter and a match filter is active.

Default value is true.

Swift
@objc public var returnOnlyMatchedResults: Bool

displayOnlyMatchedResults #

On BarkoderARConfig.

Controls whether only matched results are displayed.

If false, all decoded results are displayed, including unmatched results.
This option only applies when arMode == .matchFilter and a match filter is active.

Default value is false.

Swift
@objc public var displayOnlyMatchedResults: Bool

resultDisappearanceDelayMs #

On BarkoderARConfig.

Time delay in milliseconds after which a detected barcode result is considered expired and removed from the AR view.

Default value is 800.
Swift
@objc public var resultDisappearanceDelayMs: Int

locationTransitionSpeed #

On BarkoderARConfig.

Speed factor for smooth interpolation of overlay positions during camera movement (range 0.1 – 1.0).

Higher values mean faster transitions.

Default value is 0.3.
Swift
@objc public var locationTransitionSpeed: Float

overlayRefresh #

On BarkoderARConfig.

Defines how often AR overlays are updated on the camera preview (e.g. smooth or normal refresh rate).

Default value is .smooth.
Swift
@objc public var overlayRefresh: BarkoderAROverlayRefresh

selectedLocationColor #

On BarkoderARConfig.

Color used to draw overlays around selected barcodes in AR mode as UIColor.

Swift
@objc public var selectedLocationColor: UIColor

nonSelectedLocationColor #

On BarkoderARConfig.

Color used to draw overlays around non-selected barcodes in AR mode as UIColor.

Swift
@objc public var nonSelectedLocationColor: UIColor

selectedLocationLineWidth #

On BarkoderARConfig.

Line width of overlays drawn around selected barcodes.

Default value is 2.0.
Swift
@objc public var selectedLocationLineWidth: Float

nonSelectedLocationLineWidth #

On BarkoderARConfig.

Line width of overlays drawn around non-selected barcodes.

Default value is 2.0.
Swift
@objc public var nonSelectedLocationLineWidth: Float

locationType #

On BarkoderARConfig.

Specifies the type of AR location overlay drawn around barcodes (none, tight, or bounding box).

Default value is .boundingBox.
Swift
@objc public var locationType: BarkoderARLocationType

doubleTapToFreezeEnabled #

On BarkoderARConfig.

Enables or disables the double-tap gesture to freeze/unfreeze barcode scanning in AR mode.

Default value is true.
Swift
@objc public var doubleTapToFreezeEnabled: Bool

imageResultEnabled #

On BarkoderARConfig.

Enables or disables capturing and processing of image data when a barcode is selected in AR mode.

Default value is false.
Swift
@objc public var imageResultEnabled: Bool

barcodeThumbnailOnResult #

On BarkoderARConfig.

Enables or disables emitting barcode thumbnails with AR results.

Default value is false.
Swift
@objc public var barcodeThumbnailOnResult: Bool

resultLimit #

On BarkoderARConfig.

Maximum number of barcode results allowed in a single AR scanning session.

Set to 0 for unlimited results.

Default value is 0.
Swift
@objc public var resultLimit: Int

continueScanningOnLimit #

On BarkoderARConfig.

Defines whether scanning should continue when the result limit is reached (in non-interactive).

If false, scanning ends when the limit is reached.

Default value is false.
Swift
@objc public var continueScanningOnLimit: Bool

emitResultsAtSessionEndOnly #

On BarkoderARConfig.

Controls when AR results are emitted to the delegate.

If true, results are emitted once at session end (or when the limit is reached).

If false, results are emitted continuously as they are selected.

Default value is false.
Swift
@objc public var emitResultsAtSessionEndOnly: Bool

headerHeight #

On BarkoderARConfig.

Height of the header area drawn above the barcode in AR mode.

Default value is 19.0.
Swift
@objc public var headerHeight: Float

headerShowMode #

On BarkoderARConfig.

Defines when the header text (label above barcodes) should be visible in AR mode.

Default value is .onSelected.
Swift
@objc public var headerShowMode: BarkoderARHeaderShowMode

headerMaxTextHeight #

On BarkoderARConfig.

Maximum text height inside the AR header area.

Default value is 20.0.
Swift
@objc public var headerMaxTextHeight: Float

headerMinTextHeight #

On BarkoderARConfig.

Minimum text height inside the AR header area.

Default value is 7.0.
Swift
@objc public var headerMinTextHeight: Float

headerTextColorSelected #

On BarkoderARConfig.

Text color used for the header when the barcode is selected.

Swift
@objc public var headerTextColorSelected: UIColor

headerTextColorNonSelected #

On BarkoderARConfig.

Text color used for the header when the barcode is not selected.

Swift
@objc public var headerTextColorNonSelected: UIColor

headerHorizontalTextMargin #

On BarkoderARConfig.

Horizontal margin (left and right padding) inside the AR header around the text.

Default value is 5.0.
Swift
@objc public var headerHorizontalTextMargin: Float

headerVerticalTextMargin #

On BarkoderARConfig.

Vertical margin (top and bottom padding) inside the AR header around the text.

Default value is 3.0.
Swift
@objc public var headerVerticalTextMargin: Float

headerTextFormat #

On BarkoderARConfig.

Format string for the header text above barcodes.

Supports dynamic placeholders such as [barcode_type], [barcode_text], [gs1], etc.

Default value is "[barcode_text]".
Swift
@objc public var headerTextFormat: String



On-screen buttons #

configureCloseButton #

Configures the Close button used while scanning.

Swift
@objc public func configureCloseButton(visible: Bool, position: NSValue? = nil, iconSize: NSNumber? = nil, tintColor: UIColor? = nil, backgroundColor: UIColor? = nil, cornerRadius: NSNumber? = nil, padding: NSNumber? = nil, useCustomIcon: NSNumber? = nil, customIcon: UIImage? = nil, onClose: (@convention(block) () -> Void)? = nil)

configureFlashButton #

Configures the Flash (torch) button used while scanning, including position, size, styling and custom icons.

Swift
@objc public func configureFlashButton(visible: Bool, position: NSValue? = nil, iconSize: NSNumber? = nil, tintColor: UIColor? = nil, backgroundColor: UIColor? = nil, cornerRadius: NSNumber? = nil, padding: NSNumber? = nil, useCustomIcon: NSNumber? = nil, customIconFlashOn: UIImage? = nil, customIconFlashOff: UIImage? = nil)

configureZoomButton #

Configures the Zoom toggle button used while scanning, including position, size, styling, custom icons and zoom factors.

Swift
@objc public func configureZoomButton(visible: Bool, position: NSValue? = nil, iconSize: NSNumber? = nil, tintColor: UIColor? = nil, backgroundColor: UIColor? = nil, cornerRadius: NSNumber? = nil, padding: NSNumber? = nil, useCustomIcon: NSNumber? = nil, customIconZoomedIn: UIImage? = nil, customIconZoomedOut: UIImage? = nil, zoomedInFactor: NSNumber? = nil, zoomedOutFactor: NSNumber? = nil)