File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,14 +112,14 @@ open class BarcodeScannerController: UIViewController {
112112 self . infoView. frame = self . infoFrame
113113 self . infoView. status = self . status
114114 } ,
115- completion: { _ in
115+ completion: { [ weak self ] _ in
116116 if delayReset {
117- self . resetState ( )
117+ self ? . resetState ( )
118118 }
119119
120- self . infoView. layer. removeAllAnimations ( )
121- if self . status. state == . processing {
122- self . infoView. animateLoading ( )
120+ self ? . infoView. layer. removeAllAnimations ( )
121+ if self ? . status. state == . processing {
122+ self ? . infoView. animateLoading ( )
123123 }
124124 } )
125125 }
@@ -378,11 +378,11 @@ open class BarcodeScannerController: UIViewController {
378378 animations: {
379379 flashView. alpha = 0.0
380380 } ,
381- completion: { _ in
381+ completion: { [ weak self ] _ in
382382 flashView. removeFromSuperview ( )
383383
384384 if whenProcessing {
385- self . status = Status ( state: . processing)
385+ self ? . status = Status ( state: . processing)
386386 }
387387 } )
388388 }
You can’t perform that action at this time.
0 commit comments