What is the @package compiler directive for in Cocoa?

时光怂恿深爱的人放手 提交于 2020-01-15 03:57:06

问题


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.


回答1:


@package is a scope declaration for a particular class member. There are four:

  • @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.



来源:https://stackoverflow.com/questions/1345571/what-is-the-package-compiler-directive-for-in-cocoa

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!