Skip to content

Commit

Permalink
TS++
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Dec 15, 2017
1 parent 2111638 commit 250fd99
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/barcodescanner.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export class BarcodeScannerView extends BarcodeScannerBaseView {
export class BarcodeScanner {
private _observer: NSObject;
private _observerActive: boolean;
private _currentVolume: any;
private _scanner: any;
public _currentVolume: number;
private _scanner: QRCodeReaderViewController;
private _scanDelegate: QRCodeReaderDelegateImpl;
private _audioSession: AVAudioSession;
private _closeCallback: any;
Expand Down Expand Up @@ -231,7 +231,10 @@ export class BarcodeScanner {
let torch = arg.showTorchButton;
let flip = arg.showFlipCameraButton;
let startScanningAtLoad = true;
this._scanner = QRCodeReaderViewController.readerWithCancelButtonTitleCodeReaderStartScanningAtLoadShowSwitchCameraButtonShowTorchButtonCancelButtonBackgroundColor(closeButtonLabel, reader, startScanningAtLoad, flip, torch, arg.cancelLabelBackgroundColor);

this._scanner = QRCodeReaderViewController.readerWithCancelButtonTitleCodeReaderStartScanningAtLoadShowSwitchCameraButtonShowTorchButtonCancelButtonBackgroundColor(
closeButtonLabel, reader, startScanningAtLoad, flip, torch, arg.cancelLabelBackgroundColor);

this._scanner.modalPresentationStyle = UIModalPresentationStyle.FormSheet;

this._scanDelegate = QRCodeReaderDelegateImpl.initWithOwner(new WeakRef(this));
Expand Down Expand Up @@ -292,9 +295,9 @@ export class BarcodeScanner {
class QRCodeReaderDelegateImpl extends NSObject implements QRCodeReaderDelegate {
public static ObjCProtocols = [QRCodeReaderDelegate];

private _owner: WeakRef<any>;
private _owner: WeakRef<BarcodeScanner>;

public static initWithOwner(owner: WeakRef<any>): QRCodeReaderDelegateImpl {
public static initWithOwner(owner: WeakRef<BarcodeScanner>): QRCodeReaderDelegateImpl {
let delegate = <QRCodeReaderDelegateImpl>QRCodeReaderDelegateImpl.new();
delegate._owner = owner;
return delegate;
Expand Down

0 comments on commit 250fd99

Please sign in to comment.