iphone-x

UITabBar selectionIndicatorImage height on iPhone X

旧巷老猫 提交于 2019-11-30 09:03:53
I'm using a selectionIndicatorImage for a UITabBar , which is 49 points high, like this: UITabBar.appearance().selectionIndicatorImage = UIImage(named: "bg-tab-selected") Works just fine across all devices: Except for the iPhone X: I've tried setting the images to be vertically sliced only in the asset catalog, but that doesn't seem to have the desired effect. For some reason it also stretches horizontally? And there is a bit of padding on top. Any ideas how I can fix this? I had the same issue. I "fixed" it by subtracting the height by 1 pixel, so 48 pixels for the height of the selection

Detecting mobile device “notch”

…衆ロ難τιáo~ 提交于 2019-11-30 07:26:00
问题 With the launch of the iPhone X imminent, I'm trying to get ahead of the game and prepare some of my web applications to handle any design changes - the biggest of which being the new "notch" which houses the front camera. I was wondering whether there is, or likely to be, any way of detecting this in Javascript somehow. Interestingly, Chris Coyier has written an article about The "Notch" and CSS which led me to discover the safe-area-inset-right constant. Is there any way this can be

iOS11 ARKit: Can ARKit also capture the Texture of the user's face?

ⅰ亾dé卋堺 提交于 2019-11-30 05:29:39
I read the whole documentation on all ARKit classes up and down. I don't see any place that describes ability to actually get the user face's Texture. ARFaceAnchor contains the ARFaceGeometry (topology and geometry comprised of vertices) and the BlendShapeLocation array (coordinates allowing manipulations of individual facial traits by manipulating geometric math on the user face's vertices). But where can I get the actual Texture of the user's face. For example: the actual skin tone / color / texture, facial hair, other unique traits, such as scars or birth marks? Or is this not possible at

How to change the bottom edge color on the iPhone X programmatically?

半世苍凉 提交于 2019-11-30 04:38:35
It changes on their native keyboard/emoji board, depending which of the two are open. I thought it would change the color automatically based on UIInputViewController , however it is not occurring with custom keyboard extensions: One thing you can do to solve this. Change backgroundcolor of your ViewController's View for home indicator . And set status bar appearance separately through coding as per your needs. This will change your home indicator , status bar color plus a safe area to Chocolate color , Add separate view in safe area for your other design , as I've added yellow . If you want

WKWebView page height issue on iPhone X

牧云@^-^@ 提交于 2019-11-30 03:58:06
I find that if I use WKWebView with viewport-fit=cover and body :{height:100%} the height of html body still can not reach the bottom of iPhone X and is equal to the height of safeArea, However, the background-color can cover the fullscreen. https://ue.qzone.qq.com/touch/proj-qzone-app/test.html I load this page in a fullscreen WKWebView to reproduce the problem. I was able to fix the issue with (ObjC / Swift): if (@available(iOS 11.0, *)) { webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } or if #available(iOS 11.0, *) { webView.scrollView

iPhoneX and iPhone 8 keyboard height are different

梦想的初衷 提交于 2019-11-30 01:16:45
I use below code to get keyboard height. Then use this height to calculate the frame of an UIView to make sure this UIView just on the top of the keyboard. But in iPhoneX simulator the output is 333 and the iPhone 8 simulator is 258 . ISSUE : If use rect.height as the keyboard height for iPhone 8 simulator then the layout is correct. For iPhone X there's a gap between the UIView and keyboard. Which means 333 is higher than the real keyboard height in iPhone X. What's the reason of the height are different? And how to get the correct keyboard height? NotificationCenter.default.addObserver(self,

How to extend bottom view colour below the home indicator in iPhone X?

情到浓时终转凉″ 提交于 2019-11-30 00:24:07
Please check the attached image. The Viewcontroller's view's background colour is blue. This colour extends below the status bar and below the home indicator as you can see. There is a white view at the bottom which is a button. Here the white view is inside the safe layout guide. I want the same white colour to extend below the home indicator without adding any additional view only for iPhone-X. How to do this? You need to set/attach bottom constraint of you white view with super view. Follow these steps and see: Check bottom/bottom alignment constraint of your view. It may be attached with

Getting a white space at bottom of iPhone X screen (Xcode 9)

社会主义新天地 提交于 2019-11-29 19:58:19
I'm using Xcode 9 for my project and I'm getting a white space at the bottom, here is the screenshot: Also I'm using storyboard to design with 4 inches (iphone 5s/SE) as layout. How to avoid the white space? Your bottom constraints should be from view not from the bottom layout guide or safe area (xcode 9 specific) and your distance should be zero. Default it was pinned with layout guides , so give it with view ! Refer below screenshot for better understanding, to open this dialogue, click drop down icon of field contains 0 ! You can do same for top constraint also! Update : Second main

iOS 11 & iPhone X: UINavigationBar's toolbar spacing incorrect when embedded in UITabBarController

梦想与她 提交于 2019-11-29 19:45:18
I am experiencing an annoying problem testing the newest iOS 11 on the iPhone X simulator. I have an UITabBarController and inside each tab there is a UINavigationController , each UINavigationBar has defined also a bottom toolBar ( setToolbarHidden: ), and by default they show up at the bottom, just over the tabBar. It has been working fine so far and seems to work fine also in the upcomming iPhone 8 and 8 Plus models, but on the iPhone X there is a gap between the toolBar and the tabBar. My guess is that the toolBar doesn't realize that is displayed inside a tabBar and then leaves the

Safe area layout guides in xib files - iOS 10

末鹿安然 提交于 2019-11-29 19:25:09
I started adapting my app for iPhone X and found an issue in Interface Builder. The safe area layout guides are supposed to be backwards compatible, according to official Apple videos. I found that it works just fine in storyboards. But in my XIB files, the safe area layout guides are not respected in iOS 10. They work fine for the new OS version, but the iOS 10 devices seem to simply assume the safe area distance as zero (ignoring the status bar size). Am I missing any required configuration? Is it an Xcode bug, and if so, any known workarounds? Here is a screenshot of the issue in a test