mirror of
https://github.com/status-im/react-native.git
synced 2025-02-03 13:14:42 +00:00
RC Fix storyline cannot open bug (iOS 7)
Reviewed By: @jingc Differential Revision: D2486832
This commit is contained in:
parent
e885628245
commit
9ef24d8cc8
@ -76,7 +76,14 @@ RCT_EXPORT_MODULE()
|
||||
sizeBeingLoaded = CGSizeMake(pointSize.width * representation.scale, pointSize.height * representation.scale);
|
||||
}
|
||||
|
||||
CGSize screenSize = UIScreen.mainScreen.nativeBounds.size;
|
||||
CGSize screenSize;
|
||||
if ([[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedDescending) {
|
||||
screenSize = UIScreen.mainScreen.nativeBounds.size;
|
||||
} else {
|
||||
CGSize mainScreenSize = [UIScreen mainScreen].bounds.size;
|
||||
CGFloat mainScreenScale = [[UIScreen mainScreen] scale];
|
||||
screenSize = CGSizeMake(mainScreenSize.width * mainScreenScale, mainScreenSize.height * mainScreenScale);
|
||||
}
|
||||
CGFloat maximumPixelDimension = fmax(screenSize.width, screenSize.height);
|
||||
|
||||
if (sizeBeingLoaded.width > maximumPixelDimension || sizeBeingLoaded.height > maximumPixelDimension) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user