我试图弄清楚如何将屏幕正中间的“创建”按钮与居中的“创建”按钮右侧的“共享”按钮对齐,而不使用任意数字。
HStack (spacing: 40) {
Text("Create")
.fontWeight(.bold)
.frame(width: 185, height: 40, alignment: .center)
.cornerRadius(50)
.overlay(
Capsule(style: .circular)
.stroke(Color(red: 0.879, green: 0.369, blue: 0, opacity: 1), style: StrokeStyle(lineWidth: 2)))
Image(systemName:"square.and.arrow.up")
.resizable()
.frame(width: 25, height: 30)
.font(Font.title.weight(.light))
} .foregroundColor(Color(red: 0.879, green: 0.369, blue: 0, opacity: 1))