0
我想從一個樣本在xarmians博客中使用觸摸ID,但它給了我一個錯誤。如果使用模擬器註冊測試觸摸的原因通過,我不會否定。但它是失敗的,我有另一個問題是我使用故事板,所以我的問題是我如何推視圖控制器是succsess,並找出爲什麼觸摸ID是faling。試圖使用觸摸ID
partial void touchId(UIButton sender)
{
//Lets double check the device supports Touch ID
if (context.CanEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, out error))
{
var replyHandler = new LAContextReplyHandler((success, error) =>
{
InvokeOnMainThread(() =>
{
if (success)
{
var newVC = new UIViewController();
PresentViewController(newVC, true, null);
}
else
{
var alert = new UIAlertView("OOPS!", "Something went wrong.", null, "Oops", null);
alert.Show();
}
});
});
context.EvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, "Logging in with Touch ID", replyHandler);
}
else
{
var alert = new UIAlertView("Error", "TouchID not available", null, "BOOO!", null);
alert.Show();
}
}
它越來越到此線的應用
var alert = new UIAlertView("OOPS!", "Something went wrong.", null, "Oops", null);
你爲什麼不登錄error'的'價值的故事板ID;這將提供一個線索,看看哪裏出了問題。 – Paulw11
@ Paulw11沒有錯誤,正如解釋它只是彈出一個空白的視圖 – rogue39nin