SwiftUI学习笔录:
给View添加边框与圆角:
CustomTextFiledView { self.textString = $0 } .frame(height: 25, alignment: .leading) .padding(10) //给view添加边框与圆角 .overlay( RoundedRectangle(cornerRadius: 8, style: .continuous) .stroke(Color.gray, lineWidth: 1) ) .padding(10)