1234567891011121314151617181920212223242526272829 |
- //
- // ASScreenSafeManager.m
- // ACSION
- //
- // Created by sunyue on 2019/4/22.
- // Copyright © 2019 acsion. All rights reserved.
- //
- #import "ASScreenSafeManager.h"
- @implementation ASScreenSafeManager
- + (CGFloat)statusBarHeightOfScreen {
- return [UIApplication sharedApplication].statusBarFrame.size.height;
- }
- + (CGFloat)navBarHeightOfScreen {
- return [self statusBarHeightOfScreen] + 44;
- }
- + (CGFloat)safeBottomHeightOfScreen {
- if (@available(iOS 11.0, *)) {
- return [UIApplication sharedApplication].keyWindow.safeAreaInsets.bottom;
- } else {
- return 0;
- }
- }
- + (CGFloat)tabBarHeightOfScreen {
- return [self safeBottomHeightOfScreen] + 49;
- }
- @end
|