This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

@react-native-masked-view/masked-view

提供屏蔽视图的库。

Android
iOS
tvOS
Included in Expo Go
Recommended version:
0.3.2

重要 @expo/ui 提供了一个可直接替换 @react-native-masked-view/masked-view 的方案,在 Android 上由 Jetpack Compose 提供支持,在 iOS 上由 SwiftUI 提供支持。

@react-native-masked-view/masked-view 提供了一个遮罩视图,只显示与其遮罩元素中渲染的视图重叠的像素。

警告 在你的项目中,你一次只能安装 @react-native-community/masked-view(已废弃)或 @react-native-masked-view/masked-view 中的一个。React Navigation v6 及更高版本需要 @react-native-masked-view/masked-view,因此如果你使用的是最新版本的 React Navigation,应使用该包。

重要 该库对 Android 的支持是实验性的,你可能会在不同平台上遇到行为不一致的情况。请将你遇到的问题报告到react-native-masked-view GitHub 仓库

安装

🌐 Installation

Terminal
npx expo install @react-native-masked-view/masked-view

If you are installing this in an existing React Native app, make sure to install expo in your project. Then, follow the installation instructions provided in the library's README or documentation.

了解更多

🌐 Learn more

访问官方文档

获取有关 API 及其使用的完整信息。