MonoTouch的:了解基础属性 [英] Monotouch: Understand Foundation Attributes

查看:116
本文介绍了MonoTouch的:了解基础属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能解释一下我下面的属性?

Could you explain me the following attributes?

1) [MonoTouch.Foundation.Register(SomeClass的)]

时该属性只能用于寄存器班,IB?我必须用这个上课的时候​​我编程扩展一个类的iOS?

Is this attribute is used only for register classes with IB? Do I have to use this class when I extend an iOS class programatically?

2) [导出(initSomething)]

当我不得不使用这个属性?对于选择,确定。还有别的吗?

When do I have to use this attribute? For selector, ok. Anything else?

感谢您提前。

推荐答案

这是一个类属性公开类Objective-C的世界。你需要,如果你想调用在类中的方法。通过注册的名称将是Objective-C的世界使用你的类名。

The attribute on a class exposes the class to the Objective-C world. You need that if you want to call methods in that class. The name passed to register will be the name that the Objective-C world uses for your class.

导出用于公开一个方法或属性那个世界。

Export is used to expose a single method or property to that world.

这篇关于MonoTouch的:了解基础属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆