I have an Ionic v6.2 angular 14 app and this is my android and ios view: ANDROID:
IOS:
This is my code:
<ion-content *ngIf="(currentUser$ | async) as currentUser" class="page">
<ion-header>
<ion-toolbar mode="ios" color="primary">
<ion-title>{{currentUser.profile_name}}</ion-title>
<ion-button slot="end" id="parameters-button" (click)="onGoToParameters()">
<ion-icon slot="icon-only" name="settings-outline"></ion-icon>
</ion-button>
</ion-toolbar>
</ion-header>
<div class="sub_header">
</div>
</ion-content>
As you can see, my ion-header is under/overlay by the statusbar and the notch. I have tried --ion-safe-area-top but it seems equal to 0 with iphone13… If someone has a answer… please
2条答案
按热度按时间omvjsjqw1#
看看这是否有帮助:
参考:https://github.com/apache/cordova-ios/issues/964
iyr7buue2#
You must set
viewport-fit=cover
in your html meta tag. This css-tricks article explains a bit.Here is my full meta tag:
I am using vite and I added this in src > index.html inside the
<head>
tag.