【发布时间】:2017-10-28 14:00:05
【问题描述】:
扫描完成后需要导航到其他视图
将 Zxing 与 ZXingScannerView 一起使用
使用此代码
scannerView.StartScanning(async (result) =>
{
if (!ContinuousScanning)
{
Console.WriteLine("Stopping scan...");
Console.WriteLine("Result: " + result.Text);
scannerView.StopScanning();
if (result != null)
{
await GetScannedDetails(result.Text);
// here i need to navigate to other screen
}
}
var evt = this.OnScannedResult;
if (evt != null) evt(result);
}, this.ScanningOptions);
当我尝试导航时出现此错误
一致性错误:您正在调用只能从 UI 线程调用的 UIKit 方法。
【问题讨论】:
-
您是否阅读过有关导航的文档?
-
@Jason,我知道使用导航控制器,但我在尝试时出错。我已经更新了我的问题。
-
如果您搜索该错误消息,您将获得一些有用的提示
标签: xamarin.ios navigation zxing