美文网首页
Runtime-OBJC2_UNAVAILABLE

Runtime-OBJC2_UNAVAILABLE

作者: linbj | 来源:发表于2017-12-06 10:31 被阅读43次

runtime中有很多OBJC2_UNAVAILABLE
例如


image.png
// objc 2.0中不可使用
/* OBJC2_UNAVAILABLE: unavailable in objc 2.0, deprecated in Leopard */
#if !defined(OBJC2_UNAVAILABLE)
#   if __OBJC2__
#       define OBJC2_UNAVAILABLE UNAVAILABLE_ATTRIBUTE
#   else
        /* plain C code also falls here, but this is close enough */
#       define OBJC2_UNAVAILABLE                                       \
            __OSX_DEPRECATED(10.5, 10.5, "not available in __OBJC2__") \
            __IOS_DEPRECATED(2.0, 2.0, "not available in __OBJC2__")   \
            __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE
#   endif
#endif

相关文章

网友评论

      本文标题:Runtime-OBJC2_UNAVAILABLE

      本文链接:https://www.haomeiwen.com/subject/garkixtx.html