VStack spacing around image, but not around text

前端 未结 1 1390
醉酒成梦
醉酒成梦 2021-01-22 16:28

I have the following code:

import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Text(\"ContentView Header 1\")
              


        
相关标签:
1条回答
  • 2021-01-22 17:08
    public struct VStack<Content> : View where Content : View {
    
        /// Creates an instance with the given `spacing` and Y axis `alignment`.
        ///
        /// - Parameters:
        ///     - alignment: the guide that will have the same horizontal screen
        ///       coordinate for all children.
        ///     - spacing: the distance between adjacent children, or nil if the
        ///       stack should choose a default distance for each pair of children.
    

    Last line - "stack should choose a default distance for each pair of children"

    0 讨论(0)
提交回复
热议问题