move apiURL, appToken to libs/consts.dart, refs #9990
This commit is contained in:
@@ -11,7 +11,7 @@ import UIKit
|
||||
extension ZBarSymbolSet: Sequence {
|
||||
public typealias Element = ZBarSymbol
|
||||
public typealias Iterator = NSFastEnumerationIterator
|
||||
|
||||
|
||||
public func makeIterator() -> NSFastEnumerationIterator {
|
||||
return NSFastEnumerationIterator(self)
|
||||
}
|
||||
@@ -20,11 +20,11 @@ extension ZBarSymbolSet: Sequence {
|
||||
// TODO: Реализовать окно сканнера в этом контроллере, вместо вызова ZBarReaderViewController
|
||||
|
||||
@objc class ScannerViewController: UIViewController, ZBarReaderDelegate {
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
}
|
||||
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
let readerViewController = ZBarReaderViewController()
|
||||
@@ -33,18 +33,18 @@ extension ZBarSymbolSet: Sequence {
|
||||
readerViewController.showsZBarControls = false
|
||||
self.present(readerViewController, animated: true)
|
||||
}
|
||||
|
||||
|
||||
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
|
||||
guard let symbols = info[ZBarReaderControllerResults] as? ZBarSymbolSet else { return }
|
||||
|
||||
|
||||
for symbol in symbols {
|
||||
|
||||
|
||||
if let symbol = symbol as? ZBarSymbol, let data = symbol.data {
|
||||
|
||||
|
||||
let toast = UIAlertView()
|
||||
toast.message = data
|
||||
toast.show()
|
||||
|
||||
|
||||
navigationController?.popViewController(animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user