public override void ViewDidAppear(bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) { UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; SetNeedsStatusBarAppearanceUpdate(); } else { UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); } Console.WriteLine("Starting to scan..."); scannerView.StartScanning(result => { if (!ContinuousScanning) { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); } var evt = this.OnScannedResult; if (evt != null) { evt(result); } }, ScanningOptions); }
public override void ViewDidAppear(bool animated) { originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); Console.WriteLine("Starting to scan..."); scannerView.StartScanning(this.ScanningOptions, result => { Console.WriteLine("Stopping scan..."); scannerView.StopScanning(); var evt = this.OnScannedResult; if (evt != null) { evt(result); } }); }