@compatibility_alias

来源:互联网 发布:网络理财88财富 编辑:程序博客网 时间:2024/05/15 02:23

@compatibility_alias


参考文档

This is a feature of the Objective-C compiler rather than of the runtime, anyway since it is documented nowhere and its existence was forgotten, we are documenting it here.

The keyword @compatibility_alias allows you to define a class name as equivalent to another class name

这是不是运行时的Objective-C编译功能,不过既然是记录的地方和它的存在被遗忘,我们记录在这里。
关键词@ compatibility_alias允许你定义一个类的名字等同于另一个类的名字


例子

@compatibility_alias VIEW_CLASS UIView; 


VIEW_CLASS 就等同于UIView

0 0