I'm trying to load a Xib to a View inside the ViewController but it is throwing the below error.
System.InvalidCastException: Specified cast is not valid against this line var v = Runtime.GetNSObject(arr.ValueAt(0));
In the ViewDidLoad() method I am calling this code:
void ViewDidLoad(){
var navigationDrawer=NavigationDrawer.Create(this);
}
and in the Xib View, it is the Code.
partial Class NavigationDrawer: UIView
{
public static UIView Create(UIViewController currentViewController){
var arr = NSBundle.MainBundle.LoadNib("NavigationDrawer", null, null);
var v = Runtime.GetNSObject(arr.ValueAt(0));======>Getting Exception Here
}
}