Я создал новый проект MVVMCross Native, перенес его в v6.2.2.Создано единственное представление с именем HomeView, похожее на https://www.mvvmcross.com/documentation/tutorials/tipcalc/a-xamarinios-ui-project
На странице xib есть только один UITextField
и UIButton
.Однако после запуска приложения я получаю следующее исключение Name: NSInvalidArgumentException Reason: -[HomeView _setViewDelegateContentOverlayInsetsAreClean:]: unrecognized selector sent to instance 0x7fe8edc3cd70
Мой HomeView.cs
файл выглядит следующим образом:
[MvxRootPresentation(WrapInNavigationController = true)]
public partial class HomeView : MvxViewController
{
public HomeView() : base("HomeView", null){}
public HomeView(IntPtr handle) : base(handle){}
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();
var set = this.CreateBindingSet<HomeView, HomeViewModel>();
set.Bind(TextField).To(vm => vm.Text);
set.Bind(Button).To(vm => vm.ResetTextCommand);
set.Apply();
// Perform any additional setup after loading the view, typically from a nib.
}
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);
}
#endregion
}