iphone-x

How to remove the white space at iPhone X top viewport corners on ionic cordova [duplicate]

大兔子大兔子 提交于 2021-02-07 14:42:43
问题 This question already has an answer here : Ionic - White edge on iPhone X in header (1 answer) Closed 2 years ago . I followed the instructions here Understanding the WebView Viewport in iOS 11 and here Cordova app not displaying correctly on iPhone X (Simulator) to set viewport-fit to cover etc. But I still can't seem to get rid of these white corners on the top: What am I missing? ionic (Ionic CLI) : 3.15.2 cordova (Cordova CLI) : 7.1.0 Cordova Platforms : ios 4.5.2 Ionic Framework : ionic

Cannot rotate interface orientation to portrait upside down on iPhone X

偶尔善良 提交于 2021-02-07 07:27:20
问题 We have an app which makes use of an accessory connected to the audio jack(or lightning port in iPhone7 or later).It needs to be run in certain orientations, depending on iOS device. There are currently no issues setting device orientation in either simulator or actual device for any iPhone, except the iPhoneX simulator. Current code for setting orientation: - (BOOL)shouldAutorotate { return YES; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { //device checks omitted return

Cannot rotate interface orientation to portrait upside down on iPhone X

五迷三道 提交于 2021-02-07 07:27:18
问题 We have an app which makes use of an accessory connected to the audio jack(or lightning port in iPhone7 or later).It needs to be run in certain orientations, depending on iOS device. There are currently no issues setting device orientation in either simulator or actual device for any iPhone, except the iPhoneX simulator. Current code for setting orientation: - (BOOL)shouldAutorotate { return YES; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { //device checks omitted return

UIWebView show overlapping status bar in ios-11, iPhone-X, Xcode-9

扶醉桌前 提交于 2021-01-29 10:55:06
问题 I'm loading a web with UIWebView, everything works fine except that the iphoneX is cut off the bar where I put an "OK" button and a label with a title. // webView var webView: WKWebView! override func viewDidLoad() { super.viewDidLoad() let myURL = URL(string: "https://google.com") let myRequest = URLRequest(url: myURL!) webView = WKWebView(frame: CGRect( x: 0, y: 60, width: self.view.frame.width, height: self.view.frame.height - 60 ), configuration: WKWebViewConfiguration() ) //webView

React Native SafeAreaView background color - How to assign two different background color for top and bottom of the screen?

*爱你&永不变心* 提交于 2021-01-20 14:14:13
问题 I'm using SafeAreaView from React Native 0.50.1 and it's working pretty good except for the one part. I assigned the orange background color to the SafrAreaView but can't figure out to change the bottom unsafe area background to black. Here is the code and I included expected the result and actual result. What is the best way to make the bottom part of the screen black instead of orange? import { ... SafeAreaView } from 'react-native'; class Main extends React.Component { render() { return (

React Native SafeAreaView background color - How to assign two different background color for top and bottom of the screen?

末鹿安然 提交于 2021-01-20 14:11:45
问题 I'm using SafeAreaView from React Native 0.50.1 and it's working pretty good except for the one part. I assigned the orange background color to the SafrAreaView but can't figure out to change the bottom unsafe area background to black. Here is the code and I included expected the result and actual result. What is the best way to make the bottom part of the screen black instead of orange? import { ... SafeAreaView } from 'react-native'; class Main extends React.Component { render() { return (

How can I get the size (width, height) of the iPhone X home indicator?

妖精的绣舞 提交于 2020-12-09 09:48:39
问题 I want to know the dimensions of the home indicator bar for iPhone X / XR / Xmax. Is there any way to get those constants? Thanks! 回答1: I was looking for this today, not as a coding stand point but design. I do not know of an Apple public or private API that allows to get this information. I can't think of a coding situation where i would need it.:) The Home indicator safe area is 34pts and the total including the Tab Bar, if any, is 83pts (Apple HIG). I have calculated this myself using

How can I get the size (width, height) of the iPhone X home indicator?

喜欢而已 提交于 2020-12-09 09:47:28
问题 I want to know the dimensions of the home indicator bar for iPhone X / XR / Xmax. Is there any way to get those constants? Thanks! 回答1: I was looking for this today, not as a coding stand point but design. I do not know of an Apple public or private API that allows to get this information. I can't think of a coding situation where i would need it.:) The Home indicator safe area is 34pts and the total including the Tab Bar, if any, is 83pts (Apple HIG). I have calculated this myself using

How to deal with safeAreaView + React Navigation?

两盒软妹~` 提交于 2020-08-24 13:10:01
问题 First screenshot was without applying SafeAreaView and second screenshot is applying SafeAreaView As shown clearly that Stack header seems bulky as compare to previously. Is there anyway where we can apply SafeAreaView to only bottom part? 回答1: Instead of using SafeAreaView from React-Native , use SafeAreaView from react-navigation as below: import { SafeAreaView } from 'react-navigation'; Then you can use prop forceInset to customize the padding, which in your case, <SafeAreaView style=

safeAreaInsets in UIView is 0 on an iPhone X

风流意气都作罢 提交于 2020-08-20 18:27:30
问题 I am updating my app to adapt it for iPhone X. All views work fine by now except one. I have a view controller that presents a custom UIView that covers the whole screen. Before I was using UIScreen.main.bounds to find out the size of the view before all layout was done (I need it for putting the correct itemSize for a collectionView). I thought that now I could do something like UIScreen.main.bounds.size.height - safeAreaInsets.bottom to get the right usable size. The problem is,