.Introducing SwiftUI
SwiftUI is a modern way to declare user interfaces for any Apple platform. Create beautiful, dynamic apps faster than ever before.
- SwiftUI是一种为任何Apple平台声明用户界面的现代方法。 以前所未有的速度创建漂亮,动态的应用程序
Describe your layout just once.
- 只描述一次您的布局。
Declare the content and layout for any state of your view. SwiftUI knows when that state changes, and updates your view’s rendering to match.
- 声明视图的任何状态的内容和布局。 SwiftUI知道该状态何时发生变化,并更新视图的渲染以匹配。
Build reusable components.
构建可重用的组件。
Combine small, single-responsibility views into larger, more complex interfaces. Share your custom views between apps designed for any Apple platform.
- 将小型单一可响应视图组合到更大,更复杂的界面中。 在为任何Apple平台设计的应用之间共享您的自定义视图。
Simplify your animations.
简化您的动画。
Creating smooth animations is as easy as adding a single method call. SwiftUI automatically calculates and animates transitions when needed.
- 创建平滑动画就像添加单个方法调用一样简单。 SwiftUI会在需要时自动计算并设置动画过渡动画。
See it live in Xcode.
在Xcode中直播。
Design, build, and test your app’s interface without ever running your app. Test your controls as well as your layout using interactive previews.
- 无需运行应用程序即可设计,构建和测试应用程序的界面。 使用交互式预览测试您的控件和布局。
Tutorial
教程
Creating and Combining Views
创建和组合视图
This tutorial guides you through building Landmarks — an iOS app for discovering and sharing the places you love. You’ll start by building the view that shows a landmark’s details.
- 本教程将指导您构建标记 - 一个用于发现和分享您喜爱的地方的iOS应用程序。 您将首先构建显示地标详细信息的视图。