美文网首页
NavigationBarHeight 与 getTabBarB

NavigationBarHeight 与 getTabBarB

作者: 寒雨晚风 | 来源:发表于2023-05-04 11:53 被阅读0次

    - (CGFloat)getNavigationBarHeight {

        if(@available(iOS13.0, *)) {

            NSSet *set = [UIApplication sharedApplication].connectedScenes;

            UIWindowScene*windowScene = [setanyObject];

            UIStatusBarManager*statusBarManager = windowScene.statusBarManager;

            returnstatusBarManager.statusBarFrame.size.height+44.0;

        }else{

            return [UIApplication sharedApplication].statusBarFrame.size.height+44.0;

        }

    }

    - (CGFloat)getTabBarBarHeight {

        if(@available(iOS13.0, *)) {

            NSSet *set = [UIApplication sharedApplication].connectedScenes;

            UIWindowScene*windowScene = [setanyObject];

            UIWindow*window = windowScene.windows.firstObject;

            returnwindow.safeAreaInsets.bottom+49.0;

        }elseif(@available(iOS11.0, *)) {

            UIWindow *window = [UIApplication sharedApplication].windows.firstObject;

            return window.safeAreaInsets.bottom+49.0;

        }

        return49.0;

    }

    相关文章

      网友评论

          本文标题:NavigationBarHeight 与 getTabBarB

          本文链接:https://www.haomeiwen.com/subject/quexsdtx.html