0

I’m new in xamarin ios and I need to add view in existing project. Project use mvvmcross framework. I’ve done:

  1. Created PerevozkiViewModelClass :MvxViewModel in Core project

  2. Add UI View controller with storydoard (P.S. BaseView extends MvxViewController)enter image description here

    public partial class PerevozkiView : BaseView { public PerevozkiView() : base("PerevozkiView", null) { }

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
    
            var set = this.CreateBindingSet<PerevozkiView, PerevozkiViewModel>();
            set.Apply();
        }
    
    }
    
  3. Delete PerevozkiView.Storyboard

4.Add PerevozkiView.xib and in file owner specify PerevozkiView (I cant choose it from list, so I just hardcode “PerevozkiView as file owner)enter image description here

  1. After deploy in IOS simulator I’ve got exception: Foundation.MonoTouchException Сообщение = Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: -[UIViewController _loadViewFromNibNamed:bundle:] loaded the "PerevozkiView" nib but the view outlet was not set here in Main:

     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.
                UIApplication.Main(args, null, "AppDelegate");
            }
        }
    

I have no idea what is wrong. Pls help

Tat Leb
  • 11
  • 1
  • 3
  • "I cant choose it from list, so I just hardcode “PerevozkiView as file owner" how do you hardcode this? The selected option shows "Pere". – JKL Jan 28 '20 at 21:41
  • @JKL i have specified full name "PerevozkiView". I attach this screen to show that i have no autocomplete because PerevozkiView for any reason is out from list of classes – Tat Leb Jan 29 '20 at 06:43
  • Did you ever get his figured out? I'm running into the same issue. – mxmissile Feb 18 '20 at 21:59

0 Answers0