简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM