iOS13之前的获取方式
UIApplication.sharedApplication.keyWindow
iOS13 之后新增了UIWindowScene,keyWindow的获取也有了新的方式,将来肯定会移除该字段,记录下方法提前适配。
@property(nullable, nonatomic,readonly) UIWindow *keyWindow
API_DEPRECATED("Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes", ios(