iPhone X hide home indicator on view controller
You should override prefersHomeIndicatorAutoHidden in your view controller to achieve that: override var prefersHomeIndicatorAutoHidden: Bool { return true }
You should override prefersHomeIndicatorAutoHidden in your view controller to achieve that: override var prefersHomeIndicatorAutoHidden: Bool { return true }
The display on iPhone X, however, is 145pt taller than a 4.7″ display, resulting in roughly 20% additional vertical space for content. for more information you get HIG for iphone X from apple documents and detail description in here1 and here2 status bar height previously 20pt, now 44pt Because of the sensors on top of … Read more
There are some issues with safe area layout and backwards compatibility. See my comment over here. You might be able to work around the issues with additional constraints like a 1000 priority >= 20.0 to superview.top and a 750 priority == safearea.top. If you always show a status bar, that should fix things. A better … Read more
I was able to solve this using a version of Yoshiki’s and Zach Schneider’s answers. Notice how you set the top SafeAreaView’s flex:0 so it doesn’t expand. render() { return ( <Fragment> <SafeAreaView style={{ flex:0, backgroundColor: ‘red’ }} /> <SafeAreaView style={{ flex:1, backgroundColor: ‘gray’ }}> <View style={{ flex: 1, backgroundColor: ‘white’ }} /> </SafeAreaView> </Fragment> … Read more
I recently had a similar problem where the safe area insets are returning (0, 0, 0, 0) as soon as viewDidLoad is triggered. It seems that they are set fractionally later than the rest of the view loading. I got round it by overriding viewSafeAreaInsetsDidChange and doing my layout in that instead: override func viewSafeAreaInsetsDidChange() … Read more
iPhone X @media only screen and (device-width : 375px) and (device-height : 812px) and (-webkit-device-pixel-ratio : 3) { } iPhone 8 @media only screen and (device-width : 375px) and (device-height : 667px) and (-webkit-device-pixel-ratio : 2) { } iPhone 8 Plus @media only screen and (device-width : 414px) and (device-height : 736px) and (-webkit-device-pixel-ratio : … Read more
I found the solution to the white bars here: Set viewport-fit=cover on the viewport <meta> tag, i.e.: <meta name=”viewport” content=”initial-scale=1, width=device-width, height=device-height, viewport-fit=cover”> The white bars in UIWebView then disappear: The solution to remove the black areas (provided by @dpogue in a comment below) is to use LaunchStoryboard images with cordova-plugin-splashscreen to replace the legacy … Read more
Here is sample code (Ref from: Safe Area Layout Guide): If you create your constraints in code use the safeAreaLayoutGuide property of UIView to get the relevant layout anchors. Let’s recreate the above Interface Builder example in code to see how it looks: Assuming we have the green view as a property in our view … Read more
When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size. The new iPhone X requires a launch image sized … Read more
I was able to get around the problem by simply calling invalidateIntrinsicContentSize on the UITabBar in viewDidLayoutSubviews. -(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews]; [self.tabBar invalidateIntrinsicContentSize]; } Note: The bottom of the tab bar will need to be contained to the bottom of the main view, rather than the safe area, and the tab bar should have no … Read more