美文网首页
iOS-SwiftUI基础-Button

iOS-SwiftUI基础-Button

作者: 蓝不蓝编程 | 来源:发表于2020-06-23 10:01 被阅读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)

源代码

https://gitee.com/cxyzy1/iOS_ButtonDemo

相关文章

网友评论

      本文标题:iOS-SwiftUI基础-Button

      本文链接:https://www.haomeiwen.com/subject/tzycfktx.html