Hi! In some code and articles online I can see the usages/introductions of using "#available" block to conditionally run code depending on the environment. For example:
if #available(iOS 13, *) {
// use UICollectionViewCompositionalLayout
} else {
// show sad face emoji
}
However, I don't exactly know what kind of programming language feature is "#someName" called in Swift. I also wasn't able to find the official reference of "#available" from swift.org.
I can find the reference to "@available" and understand it is an "attribute", and there are many other attributes in Swift with different names. However, what is "#available"? Can anybody tell me whether there is official reference? and what language feature it is classified as?
Thank you!