Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对#available语法的理解是它指定了 iOS 的主要/次要版本。但是,我注意到受此if子句保护的代码将在iOS 12上执行。
#available
if
预计会#available解决>=支票吗?
>=
它似乎是由当前版本的 Xcode(针对 iOS 11)以及针对iOS的 beta 版本编译的
是的,这是意料之中的。#available旨在用于包含已在特定 iOS 版本中添加的功能,这些功能自该版本之后可用。