mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
Remove the deprecated isIPhoneX_deprecated
constant (#19920)
Summary: Cleanup the `isIPhoneX_deprecated` constant which was said to be removed by June 1st 2018. Closes https://github.com/facebook/react-native/pull/19920 Differential Revision: D8714400 Pulled By: hramos fbshipit-source-id: 0b0b3a2d7b8098baf0474afea230780c79b2fe14
This commit is contained in:
parent
db2159d0b3
commit
3b29274cc1
@ -64,21 +64,6 @@ class SafeAreaViewExample extends React.Component<
|
||||
}
|
||||
}
|
||||
|
||||
class IsIPhoneXExample extends React.Component<{}> {
|
||||
render() {
|
||||
return (
|
||||
<View>
|
||||
<Text>
|
||||
Is this an iPhone X:{' '}
|
||||
{DeviceInfo.isIPhoneX_deprecated
|
||||
? 'Yeah!'
|
||||
: 'Nope. (Or `isIPhoneX_deprecated` was already removed.)'}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exports.examples = [
|
||||
{
|
||||
title: '<SafeAreaView> Example',
|
||||
@ -86,15 +71,6 @@ exports.examples = [
|
||||
'SafeAreaView automatically applies paddings reflect the portion of the view that is not covered by other (special) ancestor views.',
|
||||
render: () => <SafeAreaViewExample />,
|
||||
},
|
||||
{
|
||||
title: 'isIPhoneX_deprecated Example',
|
||||
description:
|
||||
'`DeviceInfo.isIPhoneX_deprecated` returns true only on iPhone X. ' +
|
||||
'Note: This prop is deprecated and will be removed right after June 01, 2018. ' +
|
||||
'Please use this only for a quick and temporary solution. ' +
|
||||
'Use <SafeAreaView> instead.',
|
||||
render: () => <IsIPhoneXExample />,
|
||||
},
|
||||
];
|
||||
|
||||
var styles = StyleSheet.create({
|
||||
|
@ -51,22 +51,6 @@ RCT_EXPORT_MODULE()
|
||||
#endif
|
||||
}
|
||||
|
||||
static BOOL RCTIsIPhoneX() {
|
||||
static BOOL isIPhoneX = NO;
|
||||
static dispatch_once_t onceToken;
|
||||
|
||||
dispatch_once(&onceToken, ^{
|
||||
RCTAssertMainQueue();
|
||||
|
||||
isIPhoneX = CGSizeEqualToSize(
|
||||
[UIScreen mainScreen].nativeBounds.size,
|
||||
CGSizeMake(1125, 2436)
|
||||
);
|
||||
});
|
||||
|
||||
return isIPhoneX;
|
||||
}
|
||||
|
||||
static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
|
||||
{
|
||||
RCTAssertMainQueue();
|
||||
@ -102,11 +86,6 @@ static NSDictionary *RCTExportedDimensions(RCTBridge *bridge)
|
||||
{
|
||||
return @{
|
||||
@"Dimensions": RCTExportedDimensions(_bridge),
|
||||
// Note:
|
||||
// This prop is deprecated and will be removed right after June 01, 2018.
|
||||
// Please use this only for a quick and temporary solution.
|
||||
// Use <SafeAreaView> instead.
|
||||
@"isIPhoneX_deprecated": @(RCTIsIPhoneX()),
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user