iphone-x

UITabBar selectionIndicatorImage height on iPhone X

旧城冷巷雨未停 提交于 2019-11-29 13:50:18
问题 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? 回答1: I had the

How to change home indicator background color on iPhone X?

删除回忆录丶 提交于 2019-11-29 13:25:55
I would like to change the background color of the view that appears on the bottom of the new iPhone X with a home indicator inside. Is it possible? The home indicator color is determined automatically based on the color of the content below it. Most of the time, this means you should not worry about its color since it is out of your control, and will always be clearly visible to users. However, you can place a colored view in the area behind the home indicator to manipulate its color. Examples (Please note that these examples were taken on the iOS simulator, and behavior on a real device is

Raw Depth map SDK for IPhone X

孤街浪徒 提交于 2019-11-29 10:38:32
I did some search and found various examples, documentation on iPhone X Face ID and how it can be used for various stuff like authentication, animated emojis. Wanted to check if there is an API/SDK to get the raw depth map from iPhone X sensor to the app? From my understanding the depth calculation is done based on the projected pattern. This can be used to get depth profile of any object in front of the sensor. (Might be dependent on the texture of the object.) You'll need at least the iOS 11.1 SDK in Xcode 9.1 (both in beta as of this writing). With that, builtInTrueDepthCamera becomes one

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

谁说我不能喝 提交于 2019-11-29 04:07:12
问题 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

Detecting mobile device “notch”

大憨熊 提交于 2019-11-29 03:48:34
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 accessed in Javascript and is this a reliable test. if (window.constant.safeAreaInsetRight) { var notch = true

iPhone 8, iPhone 8 Plus and iPhone X device code

本小妞迷上赌 提交于 2019-11-29 02:26:15
I'm using the below code to get the device name NSString* code = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; Which gives the result as follows and mapped to devices @"iPhone9,1" :@"iPhone 7", @"iPhone9,3" :@"iPhone 7", @"iPhone9,2" :@"iPhone 7 Plus", @"iPhone9,4" :@"iPhone 7 Plus", Do we have the new device code for the new devices that are released (iPhone 8, iPhone 8 Plus and iPhone X) Edit: This has been corrected. The iPhone X is NOT iPhone10,5 and iPhone10,6. iPhone 8: iPhone10,1 & iPhone10,4 iPhone 8 Plus: iPhone10,2 & iPhone10,5 iPhone X: iPhone10,3 &

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

眉间皱痕 提交于 2019-11-29 01:53:09
问题 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: 回答1: 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

How to correct Tab Bar height issue on iPhone X

感情迁移 提交于 2019-11-28 19:12:06
I'm having an issue with my app when testing for iPhone X. I'm not sure how to adjust this issue, as well as not make it an issue for non iPhone X sizes. This only seems to be an issue on the iPhone X simulator. Dipak Kacha "File inspector" from right of Xcode storyboard, enable Safe Area guide layout to support your app in iPhone This post describes really good. On iOS 12.1 I've solved this issue by overriding safeAreaInsets in the UITabBar subclass: class TabBar: UITabBar { private var cachedSafeAreaInsets = UIEdgeInsets.zero override var safeAreaInsets: UIEdgeInsets { let insets = super

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

冷暖自知 提交于 2019-11-28 15:46:54
问题 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? 回答1: 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,

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

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 15:42:39
问题 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