#available、@available 被用作与 API  可用性相关的功能
#available
条件语句,类似 if while guard ,运行时查询 API 的可用性
if #available(iOS 15, *) {
    // statements to execute if the APIs are available
} else {
    // fallback statements to execute if the APIs are unavailable
}
@available
是一个声明属性,用于类或方法声明
@available(iOS 16, *)
func newMethod() {
    // A method that available on iOS 16 forward.
}
@available(iOS 16, *)
class NewClass {
    // A class that available on iOS 16 forward.
}
class OldClass {
    @available(iOS 16, *)
    func newMethod() {
        // Method that utilize iOS 16 features.
    }
    
    func oldMethod() {
        
    }
}