开始学习
复制一个包含安装步骤和此插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-home-indicator`, `@capgo/home-indicator`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/home-indicator/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
标题为“安装”您可以使用我们的 AI 助手来安装插件。将以下技能添加到您的 AI 工具中:Capgo
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins然后使用以下提示:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-home-indicator` plugin in my project.如果您更喜欢手动设置,请按照以下命令安装插件并遵循以下平台特定的说明:
bun add @capgo/capacitor-home-indicatorbunx cap sync导入
标题:导入import { HomeIndicator } from '@capgo/capacitor-home-indicator';API 概述
标题:API 概述hide
标题:隐藏隐藏屏幕底部的主屏幕指示器。
这会使主屏幕指示器不可见,提供更沉浸式的全屏体验。用户仍然可以通过滑动上方访问主屏幕,但指示器不会在他们开始滑动动作之前可见。
iOS 只有在 Android 或 web 上无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.hide();show
标题为“show”在屏幕底部显示主屏幕指示器
这恢复了 iOS 主屏幕指示器的默认可见性,使其始终对用户可见。这是默认行为。
iOS 只有在 Android 或 web 上无效。
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
await HomeIndicator.show();isHidden
标题为“isHidden”检查主屏幕指示器是否当前隐藏
返回 iOS 主屏幕指示器当前可见状态
import { HomeIndicator } from '@capgo/capacitor-home-indicator';
const { hidden } = await HomeIndicator.isHidden();if (hidden) { console.log('Home indicator is hidden');} else { console.log('Home indicator is visible');}真实来源
数据源本页面由插件生成 src/definitions.ts当公共 API 上游发生变化时,请重新同步。
从 Getting Started 开始
从 Getting Started 开始如果您正在使用 Getting Started 来规划仪表板和 API 操作,请将其连接到 使用 @capgo/capacitor-home-indicator 用于在使用 @capgo/capacitor-home-indicator 中的本机功能 API Overview 用于在 API Overview 中的实现细节 简介 简介中的实现细节 API Keys API Keys中的实现细节 设备 简介中的实现细节