开发者

UIKIT_EXTERN_CLASS and UIKIT_EXTERN, for what these 2 constants are?

开发者 https://www.devze.com 2022-12-08 18:52 出处:网络
When i go to definition of classes in documentation, i always see these 2 things (UIKIT_EXTERN_CLASS and UIKIT_EXTERN) before the @interface, what these constants stand for and why Apple put it before

When i go to definition of classes in documentation, i always see these 2 things (UIKIT_EXTERN_CLASS and UIKIT_EXTERN) before the @interface, what these constants stand for and why Apple put it before their classes?

And one more thing, there is file UIKitDefines.h and it has all these definitions/constants.

#ifdef __cplusplus
#define UIKIT_EXTER开发者_如何学CN        extern "C" __attribute__((visibility ("default")))
#else
#define UIKIT_EXTERN            extern __attribute__((visibility ("default")))
#endif

#define UIKIT_STATIC_INLINE static inline
#define UIKIT_EXTERN_CLASS  __attribute__((visibility("default")))


Take a look at this page from Apple's developer documentation. In essence, it appears those macros allow you to control the visibility of certain symbols to the rest of your application.

0

精彩评论

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