瀏覽代碼

Fixed constants bug (#5201)

* Fixed constants bug (closes #4807)

* Fixed constants bug (closes #4807)
David Jones 5 年之前
父節點
當前提交
663b1c3f60
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      lib/ios/Constants.m

+ 5
- 1
lib/ios/Constants.m 查看文件

@@ -15,7 +15,11 @@
15 15
 }
16 16
 
17 17
 + (CGFloat)bottomTabsHeight {
18
-	return CGRectGetHeight(((UITabBarController *)((UIWindow *)(UIApplication.sharedApplication.windows[0])).rootViewController).tabBar.frame);
18
+	@try {
19
+		return CGRectGetHeight(((UITabBarController *)((UIWindow *)(UIApplication.sharedApplication.windows[0])).rootViewController).tabBar.frame);
20
+	} @catch (NSException *exception) {
21
+		return 0;
22
+	}
19 23
 }
20 24
 
21 25
 @end