SwiftUI自定义边框小纸条
在SwiftUI中可以为Text、Image、Label加上边框,方法很多,这里记录几种。
使用border
Label("你是不是我最疼爱的人", systemImage: "heart.fill")
.font(.largeTitle)
.padding()
.border(Color.blue, width: 5)
这样你就得到了一个方方正正的边框
如果我们想让边框是圆角的怎么做呢?
使用background&stroke
以下是不同的方案,结果都是这样的
La...
blog.hdcola.org1 min read