464027401@qq.com
2021-09-27 b469805b2d0c9b23ca020cf9356ff137205f856c
HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLinPhoneCommon.m
@@ -22,6 +22,37 @@
    return topController;
}
+(UIViewController *) rootController {
    UIViewController*topController ;
    if ([UIApplication sharedApplication].delegate.window) {
        topController= [UIApplication sharedApplication].delegate.window.rootViewController;
    }else{
        topController=[self appWindow].rootViewController;
    }
//    while(topController.presentedViewController){
//        topController=topController.presentedViewController;
//    }
    return topController;
}
+(BOOL)rootPresentVCContent:(Class)vcClass{
    UIViewController*roootVC ;
    if ([UIApplication sharedApplication].delegate.window) {
        roootVC= [UIApplication sharedApplication].delegate.window.rootViewController;
    }else{
        roootVC=[self appWindow].rootViewController;
    }
    while(roootVC.presentedViewController){
        if ([roootVC.presentedViewController isKindOfClass:vcClass]) {
            return YES;
            break;
        }
        roootVC=roootVC.presentedViewController;
    }
    return NO;
}
+(UIWindow*)appWindow{
    UIWindow *window;
    if (@available(iOS 13.0, *)) {