xamarin.ios - Failed to create view from XIB UI using Xamarin and MvvmCross -


i'm have xamarin.ios app. written time ago , used xib define user interface. want add new view (and controller it) every time i'm adding new page , launching app following error:

failed marshal objective-c object 0x17a37a70 (type: loginview). not find existing managed instance object, nor possible create new managed instance (because type 'touch.loginview' not have constructor takes 1 intptr argument). additional information:     selector: viewdidload     method: touch.loginview:viewdidload () 

what more interesting if i'm creating new view copying existing 1 , renaming - works fine. tried figure out difference thing found following: enter image description here enter image description here

if noticed level of hierarchy added. level , why app continue fail newly created view (i have copy existing 1 if want new view).

this kind of error message can real pain normally. in case, you're pretty lucky there simple fix this. when working xib or storyboard files, want have following in controllers:

public test1viewcontroller (intptr handle) : base (handle) { } 

a general explanation of error message seeing:

such issues are, 99% of time, related managed instance no reference. @ point gc collect , crash whenever native code tries callback (now freed) managed instance.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -