forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[home] Update react-navigation to fix iPhone XR and iPhone XS Max sup…
…port
- Loading branch information
1 parent
5913221
commit 03220c8
Showing
5 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
import { Platform, Dimensions } from 'react-native'; | ||
const { width, height } = Dimensions.get('window'); | ||
const isIPhoneX = Platform.OS === 'ios' && width === 375 && height === 812; | ||
export default isIPhoneX; | ||
const IPHONE_XS_HEIGHT = 812; // iPhone X and XS | ||
const IPHONE_XR_HEIGHT = 896; // iPhone XR and XS Max | ||
const { width: WINDOW_WIDTH, height: WINDOW_HEIGHT } = Dimensions.get('window'); | ||
const IS_IPHONE_X = | ||
Platform.OS === 'ios' && | ||
!Platform.isPad && | ||
!Platform.isTVOS && | ||
(WINDOW_HEIGHT === IPHONE_XS_HEIGHT || | ||
WINDOW_WIDTH === IPHONE_XS_HEIGHT || | ||
WINDOW_HEIGHT === IPHONE_XR_HEIGHT || | ||
WINDOW_WIDTH === IPHONE_XR_HEIGHT); | ||
export default IS_IPHONE_X; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters