Livid
286.66D
534.88D
V2EX  ›  Swift

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

  •  
  •   Livid ·
    PRO
    · Oct 18, 2022 · 2530 views
    This topic created in 1328 days ago, the information mentioned may be changed or developed.

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

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

    3 replies    2023-04-22 02:12:37 +08:00
    Rhianu
        1
    Rhianu  
       Feb 1, 2023
    在文档上没有体现,但我发现在 tvOS 、iOS 、macOS 上开发 App 的测试看,各平台间距表现不同。顺便吐槽一下,这个 SwiftUI 问题太多了,用它开发商业项目走一步一个坑。
    galenjiang
        2
    galenjiang  
       Feb 21, 2023
    chipmuck
        3
    chipmuck  
       Apr 22, 2023
    在 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 左右
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   909 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 19:35 · PVG 03:35 · LAX 12:35 · JFK 15:35
    ♥ Do have faith in what you're doing.