Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for iOS

SBSBarcodePicker.h
Go to the documentation of this file.
1 //
2 // SBSBarcodePicker.h
3 // ScanditBarcodeScanner
4 //
5 // Created by Marco Biasini on 12/06/15.
6 // Copyright (c) 2015 Scandit AG. All rights reserved.
7 //
8 
9 #import <UIKit/UIKit.h>
10 #import <AVFoundation/AVFoundation.h>
11 #import <CoreGraphics/CoreGraphics.h>
12 #import <CoreVideo/CoreVideo.h>
13 #import <CoreMedia/CoreMedia.h>
14 #import "SBSCommon.h"
15 
16 @class SBSScanSession;
17 @class SBSScanSettings;
18 @class SBSBarcodePicker;
20 @protocol SBSPropertyObserver;
21 
29 
47 - (void)barcodePicker:(nonnull SBSBarcodePicker*)barcodePicker
48  didProcessFrame:(nonnull CMSampleBufferRef)frame
49  session:(nonnull SBSScanSession*)session;
50 
51 @end
52 
62 @protocol SBSScanDelegate
63 
80 - (void)barcodePicker:(nonnull SBSBarcodePicker*)picker didScan:(nonnull SBSScanSession*)session;
81 
82 @end
83 
124 @interface SBSBarcodePicker : UIViewController
125 
139 @property (nonatomic, assign) UIInterfaceOrientationMask allowedInterfaceOrientations;
140 
149 @property (nonnull, nonatomic, strong) SBSOverlayController *overlayController;
150 
162 @property (nullable, nonatomic, weak) id<SBSScanDelegate> scanDelegate;
163 
174 @property (nullable, nonatomic, weak) id<SBSProcessFrameDelegate> processFrameDelegate;
175 
181 @property (readonly, nonatomic) SBSCameraFacingDirection cameraFacingDirection;
182 
194 @property (nonatomic, assign) AVCaptureVideoOrientation cameraPreviewOrientation;
195 
202 @property (nonatomic, assign) BOOL autoFocusOnTapEnabled;
203 
213 @property (nonatomic, assign) BOOL pinchToZoomEnabled;
214 
231 - (nonnull instancetype)initWithSettings:(nullable SBSScanSettings *)settings SBS_DESIGNATED_INITIALIZER;
232 
235 
251 - (void)applyScanSettings:(nonnull SBSScanSettings*)settings
252  completionHandler:(nullable void (^)(void))handler;
253 
255 
266 - (void)addPropertyObserver:(nullable id<SBSPropertyObserver>)observer;
267 
277 - (void)removePropertyObserver:(nullable id<SBSPropertyObserver>)observer;
278 
281 
294 - (void)startScanning;
295 
311 - (void)startScanningInPausedState:(BOOL)paused;
312 
331 - (void)startScanningInPausedState:(BOOL)paused completionHandler:(nullable void (^)(void))handler;
332 
343 - (void)stopScanningWithCompletionHandler:(nullable void (^)(void))handler;
344 
354 - (void)stopScanning;
355 
369 - (void)resumeScanning;
370 
386 - (void)resumeScanningWithCompletionHandler:(nullable void (^)(void))handler;
387 
399 - (void)pauseScanning;
400 
414 - (void)pauseScanningWithCompletionHandler:(nullable void (^)(void))handler;
415 
417 
420 
438 - (CGPoint)convertPointToPickerCoordinates:(CGPoint)point;
439 
441 
449 - (BOOL)isScanning;
450 
452 
455 
465 - (BOOL)supportsCameraFacing:(SBSCameraFacingDirection)facing;
466 
475 - (BOOL)changeToCameraFacing:(SBSCameraFacingDirection)facing;
476 
484 - (BOOL)switchCameraFacing;
486 
489 
502 - (void)switchTorchOn:(BOOL)on;
504 
507 
520 - (BOOL)setRelativeZoom:(float)zoom;
522 
523 @end
void resumeScanning()
Resume scanning codes.
void pauseScanning()
Pause scanning but keep preview on.
Controls the camera and orchestrates the barcode scanning process.
Definition: SBSBarcodePicker.h:124
BOOL pinchToZoomEnabled
Whether pinch to zoom is enabled.
Definition: SBSBarcodePicker.h:213
SBSCameraFacingDirection
Definition: SBSCommon.h:40
controls the scan screen user interface.
Definition: SBSOverlayController.h:103
BOOL autoFocusOnTapEnabled
Whether tapping on the screen should trigger an auto-focus.
Definition: SBSBarcodePicker.h:202
id< SBSScanDelegate > scanDelegate
The scan delegate for this barcode picker.
Definition: SBSBarcodePicker.h:162
Holds settings that affect the recognition of barcodes, such as enabled barcode symbologies, scanning hot spot etc.
Definition: SBSScanSettings.h:29
Defines the Protocol for a scan event delegate.
Definition: SBSBarcodePicker.h:62
void startScanning()
Starts/restarts the camera and the scanning process.
SBSCameraFacingDirection cameraFacingDirection
The facing direction of the used camera.
Definition: SBSBarcodePicker.h:181
Protocol for accessing the processed sample buffers.
Definition: SBSBarcodePicker.h:28
Holds all barcodes that were decoded in the current session.
Definition: SBSScanSession.h:39
id< SBSProcessFrameDelegate > processFrameDelegate
The process frame delegate for this barcode picker.
Definition: SBSBarcodePicker.h:174
BOOL switchCameraFacing()
Changes to the opposite camera facing if it is supported.
SBSOverlayController * overlayController
The overlay controller controls the scan user interface.
Definition: SBSBarcodePicker.h:149
AVCaptureVideoOrientation cameraPreviewOrientation
The orientation of the camera preview.
Definition: SBSBarcodePicker.h:194
UIInterfaceOrientationMask allowedInterfaceOrientations
Orientations that the barcode picker is allowed to rotate to.
Definition: SBSBarcodePicker.h:139
BOOL isScanning()
Returns YES if scanning is in progress.
void stopScanning()
Stop scanning and the video preview.