This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
ArrangementView
一个 SwiftUI 的 ArrangementView 组件,可以以自适应布局排列主视图和次要视图。
Expo UI 的 ArrangementView 与官方 SwiftUI ArrangementView API 相匹配,可排列主视图和次视图。布局会根据可用空间和硬件特性(例如可折叠显示屏)进行调整。
🌐 Expo UI ArrangementView matches the official SwiftUI ArrangementView API and arranges a primary and a secondary view. The layout adapts to the available size and to hardware features, such as a foldable display.


信息 ArrangementView 需要 iOS 27.1 或更高版本。在较早的版本中,子元素会在没有容器的情况下渲染。
安装
🌐 Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
🌐 Usage
把视图放在 ArrangementView.Primary 和 ArrangementView.Secondary,然后使用 arrangementViewStyle 修饰符选择布局。
🌐 Put the views in ArrangementView.Primary and ArrangementView.Secondary, and choose the layout with the arrangementViewStyle modifier.
分开
🌐 Split
'split' 样式将两个视图并排放置。使用 splitArrangementLayoutSize 修饰符限制视图的大小。另一个视图占据剩余空间。
🌐 The 'split' style places the two views side by side. Limit the size of a view with the splitArrangementLayoutSize modifier. The other view takes the remaining space.
叠加
🌐 Overlay
'overlay' 样式会将主视图叠加在次要视图之上。当布局变为水平或垂直排列时,使用 overlayArrangementEdge 修饰符设置视图占据的边缘。
🌐 The 'overlay' style layers the primary view over the secondary view. Set the edge a view occupies when the arrangement changes to a horizontal or vertical layout with the overlayArrangementEdge modifier.
应用接口
🌐 API
import { ArrangementView } from '@expo/ui/swift-ui';
No API data file found, sorry!