Adding Outlets for MonoTouch with Apple Xcode 4

Searching over and over again, I found no way of generating those „outlets“ in Xcode 4’s new Interface Builder in conjunction with MonoTouch.

Right before getting nuts, I found this document that has the solution to it:

Transitioning from Xcode 3 to Xcode 4
A guide for MonoTouch users

The chapter named „Adding Outlets and Actions“ contains the solution to it. Basically you have to:

  1. Select a control (e.g. a button) in the designer
  2. Hold down the Control key on the keyboard
  3. Drag the control from the designer into the source corresponding code right below the @interface definition

Then, after saving the file in Xcode 4, MonoTouch shows the new outlets as properties in the .designer file.

Update 2011-10-07:

There is also a new documentation regarding the Transition from Xamarin.

Ein Gedanke zu „Adding Outlets for MonoTouch with Apple Xcode 4

  1. Richard sagt:

    I have a strange thing here.
    I added a view list on the screen, did a run. No problem

    But when i create an outlet for this control and runs it again.
    it shows me a black screen ….

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.