How to Remove space between 2 frames

51 Views Asked by At

In the first VStack the image borders do not touch. In the second VStack the image borders do touch. How can I remove the spacing in the first VStack? I need the frames to manage the image size.

import SwiftUI

struct ContentView: View {
    var body: some View {
        HStack {
            VStack {                            // Adds spacing between these two borders with frames
                Image(systemName: "globe")
                    .frame(width: 30, height: 30)
                    .border(Color.black)
                Image(systemName: "globe")
                    .frame(width: 30, height: 30)
                    .border(Color.black)
            }
            VStack {                          // No spacing between the borders
                Image(systemName: "globe")
                    .border(Color.black)
                Image(systemName: "globe")
                    .border(Color.black)
            }
        }
    }
}
0

There are 0 best solutions below