This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
AccessoryWidgetBackground
一个 SwiftUI 自适应背景视图,根据小部件的环境提供标准外观。
iOS
Included in Expo Go
Recommended version:
~57.0.3
Expo UI AccessoryWidgetBackground 与官方 SwiftUI AccessoryWidgetBackground API 匹配,并创建一个自适应的背景视图,该视图根据小组件的环境提供标准外观。
🌐 Expo UI AccessoryWidgetBackground matches the official SwiftUI AccessoryWidgetBackground API and creates an adaptive background view that provides a standard appearance based on the the widget's environment.
安装
🌐 Installation
Terminal
- npx expo install @expo/uiIf you are installing this in an existing React Native app, make sure to install expo in your project.
用法
🌐 Usage
基本访问器小部件背景
🌐 Basic accessory widget background
BasicAccessoryWidgetBackground.tsx
import { AccessoryWidgetBackground, VStack, Text, ZStack } from '@expo/ui/swift-ui'; export default function BasicAccessoryWidgetBackground() { return ( <ZStack> <AccessoryWidgetBackground /> <VStack> <Text>MON</Text> </VStack> </ZStack> ); }
应用接口
🌐 API
import { AccessoryWidgetBackground } from '@expo/ui/swift-ui';
Component
Type: React.Element<AccessoryWidgetBackgroundProps>