【问题标题】:Content displayed over the safe area iOS Capcitor angular内容显示在安全区域 iOS Capcitor angular
【发布时间】:2022-10-18 13:51:34
【问题描述】:

我正在使用电容器来构建这个 iOS 应用程序,但内容显示在安全区域。我在 app-header 或 body 标记中使用了许多 css。但他们都没有工作。我还安装了一个名为电容插件安全区但是在阅读他们的文档后可以理解该怎么做。

我将 angular 11 用于前端,将 .net 核心用于后端 api。

【问题讨论】:

    标签: ios angular capacitor


    【解决方案1】:

    更改电容器.config 文件:

    import { CapacitorConfig } from '@capacitor/cli';
    
    const config: CapacitorConfig = {
    appId: 'com.company.appname',
    appName: 'My Capacitor App',
    webDir: 'www',
    ios: {
         contentInset: 'always',
         },
    
     };
    
    export default config;
    

    将 ios 设备的 contentInset 属性添加为“始终”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-12-11
      • 1970-01-01
      • 1970-01-01
      • 2020-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多