From a67450d72c47f400e56525125318ff1d6ca0a2e8 Mon Sep 17 00:00:00 2001 From: Davin <591807572@qq.com> Date: 星期三, 18 十二月 2024 10:39:33 +0800 Subject: [PATCH] feature 萤石活动检测&画面翻转调整 --- EZSDK/EZSDK/EZ/Base/HDLEZAlertInputView.m | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/EZSDK/EZSDK/EZ/Base/HDLEZAlertInputView.m b/EZSDK/EZSDK/EZ/Base/HDLEZAlertInputView.m index bc19036..3d9ed92 100644 --- a/EZSDK/EZSDK/EZ/Base/HDLEZAlertInputView.m +++ b/EZSDK/EZSDK/EZ/Base/HDLEZAlertInputView.m @@ -30,8 +30,8 @@ @param sureTitle 纭鎸夐挳鏍囬 */ +(void)showInputAlertWithtitle:(NSString*)title cancleTitle:(NSString*)cancleTitle sureTitle:(NSString*)sureTitle keyboardType:(UIKeyboardType)keyboardType cancleBlock:(HDLEZAlertInputViewCancleBlock)cancle sureBlock:(HDLEZAlertInputViewSureBlock)sure{ - [[[[UIApplication sharedApplication] windows] lastObject] makeKeyWindow]; - [self showInputAlertToView:[[[UIApplication sharedApplication] windows] lastObject] title:title cancleTitle:cancleTitle sureTitle:sureTitle keyboardType:keyboardType cancleBlock:cancle sureBlock:sure]; + [[self currentWindow] makeKeyWindow]; + [self showInputAlertToView:[self currentWindow] title:title cancleTitle:cancleTitle sureTitle:sureTitle keyboardType:keyboardType cancleBlock:cancle sureBlock:sure]; } /*灞曠ず杈撳叆寮圭獥 @@ -204,4 +204,20 @@ } return window; } + +/*鑾峰彇褰撳墠window + */ ++(UIWindow*)currentWindow{ + UIWindow *window; + if (@available(iOS 13.0, *)) { + if ([UIApplication sharedApplication].delegate.window) { + window=[UIApplication sharedApplication].delegate.window; + }else{ + window = [UIApplication sharedApplication].windows[0]; + } + } else { + window = [UIApplication sharedApplication].delegate.window; + } + return window; +} @end -- Gitblit v1.8.0