可可中的@package编译器指令是什么? [英] What is the @package compiler directive for in Cocoa?
本文介绍了可可中的@package编译器指令是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Apple的头文件中看到了很多@package
,但是对于我来说,我找不到描述其含义的权威信息.
I see @package
a lot in Apple's header files, but for the life of me, I can't find an authoritative source that describes its meaning.
推荐答案
@package
是特定类成员的作用域声明.有四个:
@package
is a scope declaration for a particular class member. There are four:
-
@public
:随时随地均可访问. -
@protected
:可在定义它的类和继承类中访问. -
@private
:可在定义它的类中访问. -
@package
:采用64位格式,与@public
类似,但仅在同一框架内; 32位,与@public
相同.
@public
: Accessible everywhere.@protected
: Accessible within the class that defines it and inheriting classes.@private
: Accessible within the class that defines it.@package
: In 64-bit, like@public
, but only within the same framework; in 32-bit, identical to@public
.
请参见 开发者文档 了解更多信息.
See this developer doc for more information.
这篇关于可可中的@package编译器指令是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文