mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
* feat(android): fix tab resource icon size based on spec (#7737) * feat(ios): add icon rendering mode for bottom navigation (#7738) * fix(ios-tabs): crash when add tabstrip in loaded event (#7743) * fix(css): parse css selectors with escape sequences (#7689) (#7732) * fix(ios-tabs): handle nesting proxy view container (#7755) * fix-next(css): className to preserve root views classes (#7725) * docs: cut the 6.1.0 release (#7773) * fix(android-list-picker): NoSuchFieldException on api29 (#7790) * chore: hardcode tslib version to 1.10.0 (#7776) * fix(css-calc): reduce_css_calc_1.default is not a function (#7787) (#7801)
28 lines
778 B
TypeScript
28 lines
778 B
TypeScript
import * as utils from "../utils/utils";
|
|
|
|
export module ios {
|
|
export function getActualHeight(view: UIView): number {
|
|
if (view.window && !view.hidden) {
|
|
return utils.layout.toDevicePixels(view.frame.size.height);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
export function getStatusBarHeight(viewController?: UIViewController): number {
|
|
const app = UIApplication.sharedApplication;
|
|
if (!app || app.statusBarHidden) {
|
|
return 0;
|
|
}
|
|
|
|
if (viewController && viewController.prefersStatusBarHidden) {
|
|
return 0;
|
|
}
|
|
|
|
const statusFrame = app.statusBarFrame;
|
|
const min = Math.min(statusFrame.size.width, statusFrame.size.height);
|
|
|
|
return utils.layout.toDevicePixels(min);
|
|
}
|
|
}
|