SwiftUI 老年人备忘录SwiftUI Memory Notes
给经常忘记 SwiftUI 写法的人准备的速查手册。左边看代码,右边看 iPhone 预览,快速想起来这个组件怎么写、长什么样、什么时候用。A quick reference for people who keep forgetting SwiftUI syntax. Read the code on the left, check the iPhone preview on the right, and quickly remember how each API works.
Button("Save") {
print("Tap")
}
.tint(.blue)组件Components
SwiftUI 常用组件,覆盖文本、按钮、输入、列表和常见展示控件。Common SwiftUI components covering text, buttons, inputs, lists, and display controls.
布局Layout
理解栈布局、网格和自适应容器,快速搭建结构清晰的界面。Understand stacks, grids, and adaptive containers for clear interface structure.
导航Navigation
组织页面层级、标签栏和跳转关系,构建完整的应用信息架构。Organize page hierarchy, tab bars, and navigation flows.
弹出展示Presentation
弹出、覆盖和临时展示界面,集中学习 sheet、alert、popover 等展示模式。Presentation patterns for sheets, alerts, popovers, and temporary UI.
常用文档Popular docs
用于触发操作的点击控件,支持文本按钮、自定义 Label、样式定制和事件绑定。A control for triggering actions, with text labels, custom labels, styles, and event handlers.
文本排版的基础组件,适合构建标题、正文、注释和强调信息。The basic text view for titles, body copy, notes, and emphasis.
展示本地资源、系统图标和远程图片的基础视图。A view for local assets, system symbols, and remote images.
轻量文本输入组件,适合表单、搜索和设置项。A lightweight text input for forms, search, and settings.