Reference version

This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 55).

AccessoryWidgetBackground

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

iOS

For the complete documentation index, see llms.txt. Use this 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';

No API data file found, sorry!