- (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;
}
网友评论