12345678910111213141516171819202122 |
- #import "Constants.h"
-
- @implementation Constants
-
- + (NSDictionary *)getConstants {
- return @{@"topBarHeight": @([self topBarHeight]), @"statusBarHeight": @([self statusBarHeight]), @"bottomTabsHeight": @([self bottomTabsHeight])};
- }
-
- + (CGFloat)topBarHeight {
- return UIApplication.sharedApplication.delegate.window.rootViewController.navigationController.navigationBar.frame.size.height;
- }
-
- + (CGFloat)statusBarHeight {
- return [UIApplication sharedApplication].statusBarFrame.size.height;
- }
-
- + (CGFloat)bottomTabsHeight {
- return UIApplication.sharedApplication.delegate.window.rootViewController.tabBarController.tabBar.frame.size.height;
- }
-
- @end
|