2016-06-11 2 views
0

xarmiansのブログのサンプルのtouch 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); 
+0

なぜあなたはERROR' 'の値を記録していないことを歓迎するように設定されたことを確認しながら、それは何がうまくいかなかったかの手がかりを与えるでしょう。 – Paulw11

+0

@ Paulw11説明したようにエラーはありません。空白のビューが表示されます。 – rogue39nin

答えて

0

のこの行になっています。

var homeScreen = (UIViewController)Storyboard.InstantiateViewController("welcome"); 
     PresentViewController(homeScreen, true,() => { }); 

私が見せたかったビューコントローラのストーリーボードIDが

関連する問題