iphone-x

CSS safe area attributes doesn't work on iPhone X

為{幸葍}努か 提交于 2020-07-07 11:25:08
问题 In my case I'm running a web app on iPhone X, I'm trying to add a padding on top to push my body to the safe area using the safe area css attributes of Webkit padding-top: constant(safe-area-inset-top); and padding-top: env(safe-area-inset-top); . However the web view doesn't evaluate correctly these attributes and it's always set to 0. What should I dod to make it work ! code : body { padding-top: 44px; padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); } 回答1:

CollectionView header content under status bar

六眼飞鱼酱① 提交于 2020-06-24 14:05:33
问题 Here's a collection view constrained to top, left, right, and bottom of the superview with safe area layout guide enabled: I want my collection view header to be shown under the status bar. I've achieved this for iPhone 4 - 8+ screen dimensions by unchecking Safe Area Layout Guide in the size inspector for the controller's main view , and adding the following code: collectionView.contentInset = UIEdgeInsets(top: -20, left: 0, bottom: 0, right: 0) This looks great for non iPhone X view sizes:

Handle the safe area in Chrome browser on the iPhone X family

[亡魂溺海] 提交于 2020-04-30 07:29:46
问题 For the website that I am managing, I am handling the iPhone X family screen safe area using the new safe-area-inset-<position> and this is working fine on Safari browser as you can see here: With the following code: /* white container for the home bar that has an height only on devices that read the safe area to cover the transparency around that bar */ .ctc-container { background: $white; display: block; position: fixed; left: 0; right: 0; bottom: 0; width: 100%; min-height: env(safe-area

UILaunchStoryboardName and it's value CDVLaunchScreen is being removed by ionic prepare command

拥有回忆 提交于 2020-03-25 18:57:49
问题 I have a Ionic Cordova project and am trying to make sure that it is fullscreen on iPhone X and newer phones. I have gone to questions like this one and everything works fine until I run ionic prepare and it removes <key>UILaunchStoryboardName</key><string>CDVLaunchScreen</string> from the .plist file. I tried adding this: "config_munge": { "files": { "*-Info.plist": { "parents": { "UILaunchStoryboardName": [ { "xml": "<string>CDVLaunchScreen</string>", "count": 1 } ], to my ios.json and that

iPhone X home indicator hides footer in browser

时光毁灭记忆、已成空白 提交于 2020-03-05 00:22:38
问题 my webpage has a footer which is being used for navigation . It works absolutely fine except in iPhone X and above as it's being hidden by the home navigator in the browser . As I scroll up , it doesn't get hidden as the browser shows it's own bottom bar which doesn't let the footer stay at the bottom of the screen as the webpage is now constrained till the bottom bar of the browser. Following is the CSS for the footer: .footer { position: fixed; left: 0; right: 0; bottom: 0; } Is there any

Is it possible to access the infrared camera on iPhone X?

南楼画角 提交于 2020-02-20 06:07:51
问题 According to this picture: the iPhone X has an infrared camera. It is primarily used for face detection but there are other uses for infrared. Can it be accessed directly? 回答1: not via the approved iOS API library calls. But undocumented API should be possible if you guess how to do it. 回答2: Still not sure about infrared but to read the depth information from the iPhone X TrueDepth camera, we can use the AVDepthData class and related APIs. Here's a tutorial. 回答3: The company, reallusion.com

Is it possible to access the infrared camera on iPhone X?

爱⌒轻易说出口 提交于 2020-02-20 06:07:05
问题 According to this picture: the iPhone X has an infrared camera. It is primarily used for face detection but there are other uses for infrared. Can it be accessed directly? 回答1: not via the approved iOS API library calls. But undocumented API should be possible if you guess how to do it. 回答2: Still not sure about infrared but to read the depth information from the iPhone X TrueDepth camera, we can use the AVDepthData class and related APIs. Here's a tutorial. 回答3: The company, reallusion.com

iPhoneX Error - This app was not installed from the App Store and must be reinstalled manually

柔情痞子 提交于 2020-01-30 09:02:25
问题 My application is signed with Enterprise distribution certificate . When I try to install my app on iPhone X it installs successfully but when I try to open, it gives me an error "This app was not installed from the App Store and must be reinstalled manually" Please note that app is opening and working on all other devices. This issue occurs only some specific iPhone X, not on every iPhone X. Can someone please tell me why I am facing this error. Screenshot is attached 回答1: The app may have

Swift: safe area on iPhone

柔情痞子 提交于 2020-01-25 09:01:36
问题 I have ViewController with collectionView and collectionView bottom, top, leading, trailing constraints to superview. And on iPhone 8 my screen look like this: And for another devices all looks fine. But on iPhone X look like this: I use this code for my cells: func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let offset: CGFloat = 10 let width = collectionView.bounds.width / 3 - offset

Swift: safe area on iPhone

我只是一个虾纸丫 提交于 2020-01-25 09:01:08
问题 I have ViewController with collectionView and collectionView bottom, top, leading, trailing constraints to superview. And on iPhone 8 my screen look like this: And for another devices all looks fine. But on iPhone X look like this: I use this code for my cells: func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let offset: CGFloat = 10 let width = collectionView.bounds.width / 3 - offset