views:

46

answers:

1
+2  Q: 

Monotouch Classes

What does MonoTouch.Foundation.Register do? For example:

 [MonoTouch.Foundation.Register("CalendarDayViewController")]

When do I have to add the above? For a .xib to recognize it? Or in place of a .xib?

+1  A: 

I asked this on the MT list and got this in response:

You should only have to do that if you’re trying to make the method visible to the iPhone OS for something.

i’ve done lots of threading without issue without ever adding the attribute to methods.

and

Bryan is correct, I should update that example and remove the export. Exporting is useful if you're wanting to bind objective-c things like selectors to C# methods. There's a bit more information on export here - http://monotouch.net/Documentation/Binding_New_Objective-C_Types

cvista