【发布时间】:2021-03-22 21:31:08
【问题描述】:
Button(action: {
print("Round Action")
}) {
Text("Press")
.frame(width: 50, height: 50)
.foregroundColor(Color.black)
.background(Color.red)
.clipShape(Circle())
}
.background(Color.blue)
我希望实际的按钮是可点击的,而不是它周围的蓝色方形框,还有什么方法可以让我们摆脱那个框但仍然可以调整那个按钮的大小?
【问题讨论】:
-
这能回答你的问题吗? Issue with Buttons in SwiftUI on MacOS