Forum Xamarin.iOS

how to select outlets in VS2019

tati2211tati2211 Member ✭✭
edited January 29 in Xamarin.iOS

hi! im new in xamarin ios and i get "Loaded nib but the 'view' outlet was not set" exception.
Stakowerflow answer seems suitable for this case (

, but i cant find how to set otlet (steps 4 and 5 in VS2019 - screen attached).

Pls Help


Best Answer


  • tati2211tati2211 Member ✭✭
    edited February 1

    @LandLu said:
    Here is documentation demonstrating how to connect the xib file to a backing class:
    Select the view in the xib file and type in the class name in the class entry. Then click Enter key, Visual Studio will help you generate the corresponding backing class:

    Do not forget to create an instantiating method so that we could consume it somewhere else:

    public static SomeView Create()
      var arr = NSBundle.MainBundle.LoadNib ("SomeView", null, null);
      var v = Runtime.GetNSObject<SomeView> (arr.ValueAt(0));
      return v;

    Many thanks for your explanation!

Sign In or Register to comment.