barcode handler
mkaya93 opened this issue · comments
Hi,
I have a problem with barcode handler.
Problem is this barcode handler is calling too many time. So I want to push my view when I see barcode. But cause of handler is calling multiple times. App is performing segue multiple time and my app is crashing. How can I solve it ?
self.barcodesHandler = { barcodes in
if barcodes.count > 0 {
let barcode = barcodes.first
if barcode != nil {
self.performSegue(withIdentifier: "showDetail", sender: self)
}
}
Please use the way provided in the sample.