iphone-x

Cordova app not displaying correctly on iPhone X (Simulator)

余生颓废 提交于 2019-11-26 15:36:38
I tested my Cordova-based app yesterday on the iPhone X Simulator in Xcode 9.0 (9A235) and it didn't look good. Firstly, instead of filling the full screen area, there was a black area above and below the app content. And worse, between the app content and the black was two white bars. Adding cordova-plugin-wkwebview-engine so Cordova renders using WKWebView (not UIWebView) fixes the white bars. By my app is not migrated from UIWebView to WKWebView due to performance and memory leak issues when using cordova-plugin-wkwebview-engine which occur when loading images downloaded from Inapp Purchase

What is the top bar height of iPhone X?

ε祈祈猫儿з 提交于 2019-11-26 15:22:45
问题 I would like to know exact height of top bar of iPhone X. Could you please mention the status bar and navigation bar height of iPhone X. Please help me. 回答1: The display on iPhone X, however, is 145pt taller than a 4.7" display, resulting in roughly 20% additional vertical space for content. for more information you get HIG for iphone X from apple documents and detail description in here1 and here2 status bar height previously 20pt, now 44pt Because of the sensors on top of the display, the

Use Safe Area Layout programmatically

我们两清 提交于 2019-11-26 15:02:19
Since I don't use storyboards to create my views, I was wondering if there's the "Use Safe Area Guides" option programmatically or something like that. I've tried to anchor my views to view.safeAreaLayoutGuide but they keep overlapping the top notch in the iPhone X simulator. Krunal Here is sample code (Ref from: Safe Area Layout Guide ): If you create your constraints in code use the safeAreaLayoutGuide property of UIView to get the relevant layout anchors. Let’s recreate the above Interface Builder example in code to see how it looks: Assuming we have the green view as a property in our view

How to handle iphone screen sizes/resolution for background images

家住魔仙堡 提交于 2019-11-26 11:38:57
问题 After the iPhoneX, I am really struggling with the image sizes and naming conventions which supports all devices. Is there any way to use 3x images for 4.7, 5.5 snd 5.8 screens? What are the exact dimensions I should use for an imageview in full screen? 回答1: You can use image with .pdf format. So you need to manage only single scale image with 1x. It will support all screen sizes so you don't need to mange 1x,2x,3x png. So single image can adjust all devices and also reduce app size. You can

Use Safe Area Layout programmatically

梦想的初衷 提交于 2019-11-26 04:36:33
问题 Since I don\'t use storyboards to create my views, I was wondering if there\'s the \"Use Safe Area Guides\" option programmatically or something like that. I\'ve tried to anchor my views to view.safeAreaLayoutGuide but they keep overlapping the top notch in the iPhone X simulator. 回答1: Here is sample code (Ref from: Safe Area Layout Guide): If you create your constraints in code use the safeAreaLayoutGuide property of UIView to get the relevant layout anchors. Let’s recreate the above

Cordova app not displaying correctly on iPhone X (Simulator)

纵然是瞬间 提交于 2019-11-26 04:03:08
问题 I tested my Cordova-based app yesterday on the iPhone X Simulator in Xcode 9.0 (9A235) and it didn\'t look good. Firstly, instead of filling the full screen area, there was a black area above and below the app content. And worse, between the app content and the black was two white bars. Adding cordova-plugin-wkwebview-engine so Cordova renders using WKWebView (not UIWebView) fixes the white bars. By my app is not migrated from UIWebView to WKWebView due to performance and memory leak issues

Detect if the device is iPhone X

谁说我不能喝 提交于 2019-11-26 01:34:35
问题 My iOS app uses a custom height for the UINavigationBar which leads to some problems on the new iPhone X. Does someone already know how to reliable detect programmatically (in Objective-C) if an app is running on iPhone X? EDIT: Of course checking the size of the screen is possible, however, I wonder if there is some \"build in\" method like TARGET_OS_IPHONE to detect iOS... if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { CGSize screenSize = [[UIScreen mainScreen] bounds].size;

Seeing black bars at the top and bottom of the iPhone X Simulator

白昼怎懂夜的黑 提交于 2019-11-25 23:34:51
问题 Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects: the App does not use the full screen space (top and bottom area is black) a strange white bar beneath the title bar Does anybody know what is happening here and how to resolve this? I can\'t find any new settings in Interface Builder. 回答1: When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support.