forked from OliverLetterer/CDZQRScanningViewController
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDZQRScanningViewController.h
More file actions
62 lines (38 loc) · 1.62 KB
/
Copy pathCDZQRScanningViewController.h
File metadata and controls
62 lines (38 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// CDZQRScanningViewController.h
//
// Created by Chris Dzombak on 10/27/13.
// Copyright (c) 2013 Chris Dzombak. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@protocol CDZQRResult <NSObject>
@property (nonatomic, readonly) NSString *capturedString;
- (void)resumeScanning;
- (void)reset;
@end
typedef void (^CDZQRCompletionHandler)(__nullable id<CDZQRResult> result, NSError *__nullable error);
extern NSString * const CDZQRScanningErrorDomain;
typedef NS_ENUM(NSInteger, CDZQRScanningViewControllerErrorCode) {
CDZQRScanningViewControllerErrorUnavailableMetadataObjectType = 1,
};
typedef NS_ENUM(NSInteger, CDZQRCameraDevice) {
CDZQRCameraDeviceBackFacing,
CDZQRCameraDeviceFrontFacing
};
@interface CDZQRScanningViewController : UIViewController
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithCompletion:(CDZQRCompletionHandler)completionHandler;
- (instancetype)initWithDevice:(CDZQRCameraDevice)cameraDevice
completion:(CDZQRCompletionHandler)completionHandler;
- (instancetype)initWithMetadataObjectTypes:(NSArray *)metadataObjectTypes
device:(CDZQRCameraDevice)cameraDevice
completion:(CDZQRCompletionHandler)completionHandler NS_DESIGNATED_INITIALIZER;
@property (nonatomic, copy, readonly) CDZQRCompletionHandler completionHandler; // called on the main queue
/**
* An array of `AVMetadataMachineReadableCodeObject`s
*/
@property (nonatomic, readonly) NSArray *metadataObjectTypes;
@property (nonatomic, nullable, readonly) NSString *capturedString;
@end
NS_ASSUME_NONNULL_END