react-native-iphone-x-helper icon indicating copy to clipboard operation
react-native-iphone-x-helper copied to clipboard

It needs to fit iPhone14pro

Open JonsonHI opened this issue 3 years ago • 2 comments

/index.js || (dimen.height === 852 || dimen.width === 852) || (dimen.height === 932 || dimen.width === 932)

JonsonHI avatar Sep 20 '22 01:09 JonsonHI

Complementary to this, I would add a condition for Dynamic Island height. So, this should be the needs.

/index.js
|| (dimen.height === 852 || dimen.width === 852)
|| (dimen.height === 932 || dimen.width === 932)
export function getStatusBarHeight(safe) {
	const deviceModel = DeviceInfo.getModel();
	const isIphone14Pro = ['iPhone 14 Pro','iPhone 14 Pro Max'].includes(deviceModel);
    return Platform.select({
        ios: ifIphoneX(safe || isIphone14Pro ? 44 : 30, 20),
        android: StatusBar.currentHeight,
        default: 0
    });
}

of course, we need react-native-device-info and patch-package

MariusCatanoiu avatar Sep 23 '22 07:09 MariusCatanoiu

https://github.com/ptelad/react-native-iphone-x-helper/pull/45

RZulfikri avatar Sep 27 '22 05:09 RZulfikri