зеркало из https://github.com/xamarin/ios-samples.git
Fix threading issue when NFC scan times out (#387)
- https://github.com/xamarin/ios-samples/issues/385
This commit is contained in:
Родитель
9b78d01602
Коммит
bffa511ecb
|
@ -73,12 +73,10 @@ namespace NFCTagReader
|
|||
if (readerError != NFCReaderError.ReaderSessionInvalidationErrorFirstNDEFTagRead &&
|
||||
readerError != NFCReaderError.ReaderSessionInvalidationErrorUserCanceled)
|
||||
{
|
||||
|
||||
var alertController = UIAlertController.Create("Session Invalidated", error.LocalizedDescription, UIAlertControllerStyle.Alert);
|
||||
alertController.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null));
|
||||
DispatchQueue.MainQueue.DispatchAsync(() =>
|
||||
{
|
||||
this.PresentViewController(alertController, true, null);
|
||||
BeginInvokeOnMainThread (() => {
|
||||
var alertController = UIAlertController.Create ("Session Invalidated", error.LocalizedDescription, UIAlertControllerStyle.Alert);
|
||||
alertController.AddAction (UIAlertAction.Create ("Ok", UIAlertActionStyle.Default, null));
|
||||
PresentViewController (alertController, true, null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче