萤石云 iOSSDK,移植跨平台相关工程
Davin
2024-06-07 4c1abca185a5727da6fb314a0cb4cd44bfe1b3bf
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