iOS-SwiftUI基础-Button
2020-06-23 本文已影响0人
蓝不蓝编程
效果图
代码
Button("按钮"){print("haha")}
Button(action: {print("haha") })
{
Text("按钮2")
}
Button(action: {print("haha") })
{
Image(systemName: "clock")
Text("按钮3")
}
Button(action: {print("haha") })
{
Image(systemName: "clock")
Text("按钮4")
}
.foregroundColor(Color.white)
.background(Color.orange)