正文
// // GroupPage.swift // SwiftUIDeom // // Created by zhoukang03 on 2023/3/28. // import SwiftUI struct GroupPage : View { var body: some View { VStack { Group { Text("Hello World !") Text("Hello World !") } .padding(5) .border(Color.orange.gradient, width: 1) .cornerRadius(5) Group { Text("Hello World !") Text("Hello World !") }.padding(5) .border(Color.black.gradient, width: 1) .cornerRadius(5) Group { Text("Hello World !") Text("Hello World !") }.padding(5) .border(Color.purple.gradient, width: 1) .cornerRadius(5) }.navigationBarTitle(Text("Group")) } } #if DEBUG struct GroupPage_Previews : PreviewProvider { static var previews: some View { GroupPage() } } #endif
示例图
标签:GroupPage,Group,17,Text,SwiftUI,World,border,Hello From: https://www.cnblogs.com/zyzmlc/p/17265653.html