I wasted hours finding out what's going on here. I've created a View Controller using Xamarin Studio's wizard. This gave me a
Everything's fine until here. I need to dynamically load that created ViewController (!). I used the following lines:
var nib = UINib.FromName("ViewController", NSBundle.MainBundle); var objects = nib.Instantiate(this, null);
As well as two other possibilities to load that View Controller. However, loading View Controllers using any built in Nib-Loading-functionality always results in loading the corresponding View only, which eventually causes these annoying 'not code-compilant' errors when outlets are required. I know that these errors are usually caused by broken xib's, but I retried the instantiation of a simple custom view controller multiple times, it simply doesn't work, which goes even for default generated controllers; the View is loaded, without it's View Controller. But I need to instantiate both from a xib.
So, what is the correct way to load a ViewController (not just the View)?