iphone-x

iPhone X: Incorrect launch-screen orientation used

ぃ、小莉子 提交于 2019-12-08 15:41:06
问题 I am testing image launch-screens on the iPhone X and ran into a strange behavior. So I'd like to request some feedback before opening a radar: I created a portrait and landscape launch-screen with the dimensions 1125 x 2436 Pixel (portrait) and 2436 x 1125 Pixel (landscape). Then I add them to the asset catalog and they are picked up correctly: So far so good. Then I run the app on the iPhone X Simulator (I've reset the app before to ensure nothing is cached) and the (stretched) landscape

How to force UITabBar compact design when in landscape on iPhone X?

久未见 提交于 2019-12-07 21:37:38
问题 So, I'm having a problem with the UITabBar on iPhone X. The problem is that the tab bar doesn't adjust the icons when it is in landscape mode, like the UITabBarController. 1 - I've set the safe area settings. 2 - I've put the tab bar inside a UI view. But this only fixes the tab bar misplacement on iPhone X. My problem is better described in the image below: When running on iPhone 8 (anyone but iPhone X) the tab bar works like expected. But when running (the same view, with no changes) on

Biometry Type when user denied biometry usage

和自甴很熟 提交于 2019-12-07 09:21:15
问题 In our app, the user has to register to the device biometry in order to use it for authentication. The registration text and legal notes are according to the relevant biometry (register to touch ID or register to face ID) As far as I found, the biometry type is obtainable via the LAContext, but if the user denies usage of biometry, then the context returns biometryType=.none Any ideas other that asking for the screen size and comparing to iphone X (bad bad code)? static fileprivate var

iPhone X - Set the color of the area around home indicator

℡╲_俬逩灬. 提交于 2019-12-07 08:45:35
问题 I'm pretty much new to Xcode when trying to align a sheet to the safe area of iPhone X, it leaves a transparent area below the sheet. Is there a way to set the fill of that area w/o expanding the sheet or align outside of the safe area? 回答1: Here is my tiny extension. If anybody can suggest an improvement to not access added view by "magic number" tag - welcome! extension UIViewController { private static let insetBackgroundViewTag = 98721 //Cool number func paintSafeAreaBottomInset(withColor

iphoneX not call prefersStatusBarHidden

被刻印的时光 ゝ 提交于 2019-12-07 04:56:43
问题 info.plist <key>UIViewControllerBasedStatusBarAppearance</key> <true/> UIViewController override var prefersStatusBarHidden: Bool{ return true } when i use 6p ,it's ok but iphoneX ,it's can't call and StatusBar not hidden 回答1: You need to check if your view controller is included in a container (i.e. UINavigationController ). If that is the case, the full procedure is this: 1) Set the View controller-based status bar appearance value in info.plist file to YES 2) In your child controller add

What would be the User Agent string for iPhone 8, iPhone 8 Plus and iPhone X?

人盡茶涼 提交于 2019-12-07 03:54:02
问题 In a device detection, what would be the user agent for the new iPhone 8, iPhone 8 Plus and iPhone X? 回答1: Here is the user agent string for them: Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 Source: The iOS 11 GM firmware model number is 15A372 , which will very likely be the same as the model number of the final iOS 11. Here is a user agent from a beta version of iOS 11, which has the AppleWebKit and Safari

prefersHomeIndicatorAutoHidden not working on iPhone X

試著忘記壹切 提交于 2019-12-07 01:48:23
问题 I am currently updating one of my apps to iPhone X and tried to hide the home indicator on a fullscreen viewcontroller showing an image using: override func prefersHomeIndicatorAutoHidden() -> Bool { return true } This method seems to do nothing, though. It is never called and the home indicator is never hidden, even after a while of inactivity. The simulator does seem to support this since the Photos app does hide the home indicator. Is there some other flag that needs to be set to make this

iPhone X Safe Area Appears to be below Opaque Toolbar

余生颓废 提交于 2019-12-07 01:27:34
问题 I can't properly constrain a view on the iPhone X to be above the bottom opaque toolbar. You can see here that the view constrained to the bottom of the Safe area is obscured by the toolbar: While for other iPhone models and sizes the view is correctly displayed above the toolbar: Here are the constraints I've added: Could someone kindly explain me what should I do? 回答1: I've solved the issue by selecting "Extend edges under Opaque Bars" for the UIViewController in question: With option

Ionic tab bar overlaps home button (iPhone X - iOS 11)

拜拜、爱过 提交于 2019-12-06 22:16:36
问题 With iOS 11 and iPhone X Apple specified every app should live in a "safe area" (due to the virtual home button): Inset essential content to prevent clipping. [...] For best results, use standard, system-provided interface elements and Auto Layout to construct your interface. All apps should adhere to the safe area and layout margins defined by UIKit, which ensure appropriate insetting based on the device and context. The safe area also prevents content from underlapping the status bar,

How to add the iPhone X screen dimensions to the mix of different iPhone dimensions in Unity

£可爱£侵袭症+ 提交于 2019-12-06 17:32:08
问题 Generally for Unity I design all my artwork in Illustrator. So I start off with 1440x1920 (for portrait games) and outline a red frame of 1080x1920. So everything that fits well within the 1080x1920 usually covers the family of iOS devices for me. Then I set the Pixels Per Unit to 192 for all my images. This approach has really served me well. Now that the iPhone X is in the mix, how can I cater for it in a similar way? 回答1: As My experience, you don't have to do many things, the gameobject