I am new in xamarin ios, my app is crashed when running the app and throws an exception "Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in …".How can I manage it..
Please help me...
Here is my code ViewController
public partial class LoginViewController : UIViewController
{
public LoginViewController(IntPtr handle) : base(handle)
{
}
public LoginViewController() :base("LoginViewController",null)
{
}
public override void DidReceiveMemoryWarning()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
#region View lifecycle
public override void ViewDidLoad()
{
base.ViewDidLoad();
}
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
}
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);
}
public override void ViewWillDisappear(bool animated)
{
base.ViewWillDisappear(animated);
}
public override void ViewDidDisappear(bool animated)
{
base.ViewDidDisappear(animated);
}
partial void Btn_Login_TouchUpInside(UIButton sender)
{
}
#endregion
}
here is my AppDelegate
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
UIWindow window;
UINavigationController navigationController;
UIViewController viewController;
window = new UIWindow(UIScreen.MainScreen.Bounds);
viewController = new LoginViewController();
navigationController = new UINavigationController();
navigationController.PushViewController(viewController, false);
window.RootViewController = navigationController;
window.MakeKeyAndVisible();
return true;
}
I got an exception in Main.cs
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
try
{
UIApplication.Main(args, null, "AppDelegate");
}
catch(System.Exception ex)
{
}
}
}