SwiftUI 里的 VStack / HStack 的 spacing 是否有来自 Apple 官方的标准?

2022 年 10 月 18 日
 Livid

比如各种元素之间的间距:表单和按钮之间的间距等等。

Apple 是否有发布过这方面的标准?

2785 次点击
所在节点    Swift
3 条回复
Rhianu
2023 年 2 月 1 日
在文档上没有体现,但我发现在 tvOS 、iOS 、macOS 上开发 App 的测试看,各平台间距表现不同。顺便吐槽一下,这个 SwiftUI 问题太多了,用它开发商业项目走一步一个坑。
galenjiang
2023 年 2 月 21 日
chipmuck
2023 年 4 月 22 日
在 WWDC19 的 Building Custom Views with SwiftUI session 中的 Layout 讲解部分有提到:

“You'll also find that the baseline to baseline spacing for adjacent text exactly matches Apple's human interface guidelines, as does the baseline to edge spacing.”

但是没有讲到具体数值。

https://developer.apple.com/videos/play/wwdc2019/237/

时刻在 12:12 左右

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/887919

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX