xamarin studioを使用して私のアプリで単純なセグを試しています。私は「現在モーダル」機能を使用してセグエを開始するためにストーリーボードを使用しますが、毎回私は、私は次のエラーが表示さシミュレータでセグエを実行するためのボタンをクリックします。Xamarinで動作しない単純なSegue
Failed to marshal the Objective-C object 0x7f8018511770 (type: loginViewController). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'iOSApp.loginViewController' does not have a constructor that takes one IntPtr argument).
あるかもしれないものに関してどのようなアイデア問題を引き起こしている? main.storyboardファイルのスクリーンショットも添付しました。
次のコードスニペットは、私のViewController.cs
ファイルとloginViewController.cs
コード
using System;
using UIKit;
namespace iOSApp
{
public partial class ViewController : UIViewController
{
protected ViewController(IntPtr handle) : base(handle)
{
// Note: this .ctor should not contain any initialization logic.
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Perform any additional setup after loading the view, typically from a nib.
}
public override void DidReceiveMemoryWarning()
{
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
}
}
とあなたのLoginViewController
クラスで
using System;
using UIKit;
namespace iOSApp
{
public partial class loginViewController : UIViewController
{
public loginViewController(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Perform any additional setup after loading the view, typically from a nib.
}
public override void DidReceiveMemoryWarning()
{
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
}
}
、私の答え – SushiHangover
上のものと一致することを変更し、将来的にはコードの*スクリーンショット*を追加しないで、コードをテキストとして追加してください。それは検索可能で他の人が簡単に見直すことができますが、スクリーンショットはそうではありません;-) – SushiHangover
同じエラーコード – bananibau5