Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 279
Bryan Avatar asked Aug 09 '26 02:08

Bryan


1 Answers

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