Closed aubrey-fowler closed 1 year ago
Don't exactly know if it is the case here. But I had a similiar issue with iPhone 11 Max, which always displayed a white Border in the bottom. (Sorry no Screenshot) I always thought it has to do with the "home button" or status bar.
At least as really nothing worked I changed the Code for: CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m
at line 399:
if (![@"fast" isEqualToString:decelerationSetting]) {
[wkWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateNormal];
} else {
[wkWebView.scrollView setDecelerationRate:UIScrollViewDecelerationRateFast];
}
wkWebView.allowsBackForwardNavigationGestures = [settings cordovaBoolSettingForKey:@"AllowBackForwardNavigationGestures" defaultValue:NO];
wkWebView.allowsLinkPreview = [settings cordovaBoolSettingForKey:@"Allow3DTouchLinkPreview" defaultValue:YES];
// Added this here
if (@available(iOS 11.0, *)) {
[self.webView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever];
}
Hi everyone
I experience the same issue on some pages on iPhone 11 (iOS 14.5) after the first load of a page. If I load it again, it often disapears. In android there is no problem.
@aubrey-fowler : did you find any other solution? @ARMistice : did you experience any sideeffects by adding your code?
Thanks for the contribution!
No side effects. It works well for over half a year in my app. Don't know if it is already in the main branch, as I don't see any reason why it shouldn't be there.
Okey, great. Thanks for your feedback and solution! I will test it in my case and give some feedback later.
@ARMistice We have said many times, we will not set UIScrollViewContentInsetAdjustmentNever
because it removes control from the app author. Every app should define their content inset behaviour with the viewport-fit
meta tag, it is not up to Cordova to make that decision.
The solution to content not filling the screen after adding the meta tag, is to use height: 100vh
instead of height: 100%
.
In my case it I needed to change my css classes. The padding-bottom resulted in the nav going below the border. Unfortunately I only noticed this in iOS version on some devices / iOS-Versions. Anyways, thanks for the feedback.
@ARMistice We have said many times, we will not set
UIScrollViewContentInsetAdjustmentNever
because it removes control from the app author. Every app should define their content inset behaviour with theviewport-fit
meta tag, it is not up to Cordova to make that decision.The solution to content not filling the screen after adding the meta tag, is to use
height: 100vh
instead ofheight: 100%
.
@dpogue Many thanks for this hint, I am sorry if I missed these solution. In the time as it appears a few years ago, I couldn't solve it with a lot of tries using viewport-fit tag and layout changes using full screen display on xcode. But perhaps (I cannot remember anymore) I haven't tried the "height: 100vh;" solution. Should this go into the body style, if I want a complete full-screen experience in Android and iOS?
I added the fix directly to my www/index.html
. That worked for me.
<!DOCTYPE html>
<html style="height: 100vh; width: 100vw;">
...
</html>
I've marked this issue as stale because it's been over a year with no further comments. If this is still an issue in the latest cordova-ios version and an up-to-date iOS version when using the correct CSS values for the viewport, please let us know. Otherwise, this issue will be closed.
Closing as stale.
I have an app written in Ionic v1, Cordova, and AngularJS 1.5.3.
The problem that I have does not occur on Android devices at all.
iPhones tested on: iPhone SE, iPhone 8, iPhone X, and iPhone XR.
For iOS 13.6 the problem occurs on: iPhone SE, iPhone 8, iPhone X, and iPhone XR. iPhone X, and iPhone XR ( completely pushes the buttons out of view )
For iOS 12 the problem occurs on:
iPhone XR - somewhat occurs iPhone 8 - does not occur iPhone SE - does not occur iPhone X - somewhat occurs
For iOS 11: it does not occur on iPhone 8. There are no problems. iPhone SE - no problems It somewhat occurs on the iPhone X. iPhone XR does not run iOS 11.
As the version of iOS increases, it seems to have more of an effect.
What my code is doing:
My page is for the user to enter an absence and they have the option of adding photo attachments. The attachment is just going to be added as an ion-item in my ion-list.
I have an ionic view and a footer with a button in it. When I add an ionic item to my ionic list, it seems to push the footer button down out of the "safe area" and it does so permanently.
Even if I go to a different page and come back again the problem persists. It also seems to permanently affect the "safe area" on the different pages of my app.
Problem: As the attachment list grows, it pushes the footer button down out of the safe area
How can I keep my button in my footer in place on the latest versions of iOS?
Code snippet:
Environment:
In the past, the new iPhone X came out and I added some code to make adjustments for the "safe area".
css
html
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
As I'm using cordova-ios 6.1.0 I'm using WkWebView only.