iOS13 获取keyWindow
2019-12-27 本文已影响0人
晨煜煌
func _keyWindow() -> UIWindow? {
if #available(iOS 13.0, *) {
return UIApplication.shared.windows[0]
} else {
return UIApplication.shared.keyWindow
}
}
func _keyWindow() -> UIWindow? {
if #available(iOS 13.0, *) {
return UIApplication.shared.windows[0]
} else {
return UIApplication.shared.keyWindow
}
}