Comments (8)
index.js didn't provide iPhone12 series support.
const X_WIDTH = 375;
const X_HEIGHT = 812;
const XSMAX_WIDTH = 414;
const XSMAX_HEIGHT = 896;
const PAD_WIDTH = 768;
const PAD_HEIGHT = 1024;
const IPHONE12_H = 844;
const IPHONE12_Max = 926;
const IPHONE12_Mini = 780;
const { height: D_HEIGHT, width: D_WIDTH } = Dimensions.get('window');
const { PlatformConstants = {} } = NativeModules;
const { minor = 0 } = PlatformConstants.reactNativeVersion || {};
const isIPhoneX = (() => {
if (Platform.OS === 'web') return false;
return (
Platform.OS === 'ios' &&
((D_HEIGHT === X_HEIGHT && D_WIDTH === X_WIDTH) ||
(D_HEIGHT === X_WIDTH && D_WIDTH === X_HEIGHT)) ||
((D_HEIGHT === XSMAX_HEIGHT && D_WIDTH === XSMAX_WIDTH) ||
(D_HEIGHT === XSMAX_WIDTH && D_WIDTH === XSMAX_HEIGHT)) ||
(D_HEIGHT === IPHONE12_H) || (D_HEIGHT === IPHONE12_Max) || (D_HEIGHT === IPHONE12_Mini)
);
})();
Add some iPhone12 related adjustments to index.js will solve the issue.
using:
react-native-safe-area-view": "0.11.0
from react-native-safe-area-view.
Okay, I got it. I had custom height of the header that's why it didn't work after update libraries. Thank You for answer 😄
from react-native-safe-area-view.
same problem with react-navigation v4
from react-native-safe-area-view.
Same here for react-navigation v4 and:
"react-native-safe-area-context": "^1.0.2",
"react-native-safe-area-view": "^2.0.0",
from react-native-safe-area-view.
I've solved the issue by updating these 3 libraries.
Closing this issue now.
Let me know if anyone faces any issue.
from react-native-safe-area-view.
@Abhishek-Sankey are You using react-navigation v5 or v4 ?
from react-native-safe-area-view.
@Abhishek-Sankey are You using react-navigation v5 or v4 ?
it's v4
from react-native-safe-area-view.
Any solution on react-navigation v3?
I think I would follow @LoKiLyn 's solution
from react-native-safe-area-view.
Related Issues (20)
- EventEmitter for safe area insets changing HOT 1
- Jest failing HOT 3
- Calling 'getNode()' on the ref of Animated component is no longer necessary HOT 11
- TaskQueue: Error with task: undefined is not an object (this.view.component.measureInWindow) HOT 1
- Typescript declaration
- White flash when using this library with Wix react-natie-navigation HOT 1
- Consider Android 9&10 bottom controls. HOT 1
- TypeError: TaskQueue: Error with task: undefined is not an object (evaluating '_this.view{component.measureInWindow') HOT 13
- I cannot install new Packages - EISGIT Error HOT 1
- NPM ERR! EISGIT - NEED HELP NOW! - HOT 1
- Import variables got interchanged in the documentation. HOT 1
- Update example of usage HOT 7
- Error on build on iOS HOT 1
- Remove curlies on import { SafeAreaView } HOT 2
- Error null is not object (evaluating 'percent.includes') After migrating from rn 0.60 to rn 0.63.2 on ios only HOT 2
- Not working correctly on iPhone 12 Series phones HOT 6
- Large `forwardedRef` in snapshot, causes test to sometimes error HOT 2
- Type 'string' is not assignable to type 'Edge'.
- _reactNativeSafeAreaView.withSafeArea is not a function?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-safe-area-view.