开发者

Monotouch Classes

开发者 https://www.devze.com 2022-12-30 15:45 出处:网络
What does MonoTouch.Foundation.Register do? For example: [MonoTouch.Foundation.Register(\"CalendarDayViewController\")]

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

0

精彩评论

暂无评论...
验证码 换一张
取 消