react-native-navigation的迁移库

1234567891011121314151617181920212223
  1. #import "Constants.h"
  2. #import "UIViewController+LayoutProtocol.h"
  3. @implementation Constants
  4. + (NSDictionary *)getConstants {
  5. return @{@"topBarHeight": @([self topBarHeight]), @"statusBarHeight": @([self statusBarHeight]), @"bottomTabsHeight": @([self bottomTabsHeight])};
  6. }
  7. + (CGFloat)topBarHeight {
  8. return [RCTPresentedViewController() getTopBarHeight];
  9. }
  10. + (CGFloat)statusBarHeight {
  11. return [UIApplication sharedApplication].statusBarFrame.size.height;
  12. }
  13. + (CGFloat)bottomTabsHeight {
  14. return [UIApplication.sharedApplication.delegate.window.rootViewController getBottomTabsHeight];
  15. }
  16. @end