Monotouch and XCode 4, where did the outlets go?

2019-02-21 17:21发布

问题:

Today I updated my mac with the latest version of MonoDevelop, MonoTouch and the Mono-Framework. I also downloaded the latest version of XCode, version 4 (a nifty 4.5 gig download).

At first I did not notice it because I was busy copying code into my project for re-use. But when the time came to actually add some controls, actions and outlets to the MainWindow file - I realized that something was missing.

Hopefully I have over-looked something, because I cannot find functions for adding outlets and actions any more? After googling the problem I realized that the new XCode now does these things by code -- but not in C#, it's exclusively an Objective C thing.

How exactly do I solve this problem? I am currently downloading XCode 3.2.6 but surely there has to be a better option? (I dont even know if this will install over the 4.x version) How exactly do I define actions and outlets by code? Are there any tutorials on this to curve the extra time it will take?

Any help is welcome

Update: A tip for those who need to remove XCode and start from scratch. Open a terminal window and type:

"sudo /Developer/Library/uninstall-devtools --mode=all"

This will remove your current XCode installation (all of it). Remember to re-boot your Mac afterwards. You can then install an older version of XCode.

回答1:

From Miguel's MT 4.0 Announcement

We are currently hard at work to add support to MonoDevelop to work with the new XCode 4.

With XCode 4, Apple removed Interface Builder as a standalone tool. We should have a beta in a couple of weeks of the solution we came up with.



回答2:

you can install them side by side by doing so(I believe you have Xcode 4 installed): Run the Xcode 3 installer When you can choose the install location change it to the folder of your choice but not to developer Complete the installation and open Xcode 3 done



回答3:

use mono for mac os.

then convert your application on monomac solution and build and run application, after build u get .app file,

for this you need C# plugin on mono.

or cocoa sharp plugin.