This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
覆盖层
一个 SwiftUI 覆盖层组件,用于在另一个视图上方叠加内容。
iOS
tvOS
Included in Expo Go
Expo UI Overlay 与官方 SwiftUI overlay 修饰器相匹配,并提供了一种将辅助内容层叠在视图之上的方式,且可使用指定的对齐方式进行定位。


安装
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
OverlayExample.tsx
API
import { Overlay } from '@expo/ui/swift-ui';
Component
Type: React.Element<OverlayProps>
Optional • Type:
Alignment • Default: 'center'The alignment of the overlay content relative to the base content.