@@ -89,7 +89,7 @@ open class BarcodeScannerController: UIViewController {
8989 } ( )
9090
9191 /// The current controller's status mode.
92- var status : Status = Status ( . scanning) {
92+ var status : Status = Status ( state : . scanning) {
9393 didSet {
9494 let duration = status. animated &&
9595 ( status. state == . processing
@@ -102,7 +102,7 @@ open class BarcodeScannerController: UIViewController {
102102
103103 DispatchQueue . main. asyncAfter (
104104 deadline: DispatchTime . now ( ) + Double( Int64 ( 2.0 * Double( NSEC_PER_SEC) ) ) / Double( NSEC_PER_SEC) ) {
105- self . status = Status ( . scanning)
105+ self . status = Status ( state : . scanning)
106106 }
107107
108108 return
@@ -230,7 +230,7 @@ open class BarcodeScannerController: UIViewController {
230230
231231 if authorizationStatus == . authorized {
232232 setupSession ( )
233- status = Status ( . scanning)
233+ status = Status ( state : . scanning)
234234 } else if authorizationStatus == . notDetermined {
235235 AVCaptureDevice . requestAccess ( forMediaType: AVMediaTypeVideo,
236236 completionHandler: { ( granted: Bool ) -> Void in
@@ -239,11 +239,11 @@ open class BarcodeScannerController: UIViewController {
239239 self . setupSession ( )
240240 }
241241
242- self . status = granted ? Status ( . scanning) : Status ( . unauthorized)
242+ self . status = granted ? Status ( state : . scanning) : Status ( state : . unauthorized)
243243 }
244244 } )
245245 } else {
246- status = Status ( . unauthorized)
246+ status = Status ( state : . unauthorized)
247247 }
248248 }
249249
@@ -275,7 +275,7 @@ open class BarcodeScannerController: UIViewController {
275275 - Parameter message: Error message that overrides the message from the config.
276276 */
277277 open func resetWithError( _ message: String ? = nil ) {
278- status = Status ( . notFound, text: message)
278+ status = Status ( state : . notFound, text: message)
279279 }
280280
281281 /**
@@ -284,7 +284,7 @@ open class BarcodeScannerController: UIViewController {
284284 - Parameter animated: Flag to show scanner with or without animation.
285285 */
286286 open func reset( animated: Bool = true ) {
287- status = Status ( . scanning, animated: animated)
287+ status = Status ( state : . scanning, animated: animated)
288288 }
289289
290290 /**
@@ -367,7 +367,7 @@ open class BarcodeScannerController: UIViewController {
367367 flashView. removeFromSuperview ( )
368368
369369 if processing {
370- self . status = Status ( . processing)
370+ self . status = Status ( state : . processing)
371371 }
372372 } )
373373 }
0 commit comments