Reference version

AccessoryWidgetBackground

一个 SwiftUI 自适应背景视图,会根据小组件的环境提供标准外观。

iOS
Included in Expo Go
Bundled version:
~56.0.6

For the complete documentation index, see llms.txt. Use this file to discover all available pages.

Expo UI AccessoryWidgetBackground 与官方 SwiftUI AccessoryWidgetBackground API 保持一致,并创建一个自适应背景视图,根据小组件的环境提供标准外观。

安装

Terminal
npx expo install @expo/ui

If you are installing this in an existing React Native app, make sure to install expo in your project.

用法

基础 accessory widget 背景

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

AccessoryWidgetBackground

iOS

Type: React.Element<CommonViewModifierProps>