API_AVAILABLE和available

API_AVAILABLE(ios(10.0)) @interface TestClass: NSObject { }
//这种方式时限制编译,使用该接口必须iOS级,多少才能编译。
@available(iOS 10.0, *)可以用于运行时判断。
posted @ 2022-11-03 20:03  cyssmile  阅读(509)  评论(0)    收藏  举报