代码拉取完成,页面将自动刷新
HSplitViews
创建左中右三栏布局?使用 HSplitViews
布局容器,将其子级排列在一条水平线上,并允许用户使用放置在它们之间的分隔符来调整它们的大小。
struct ContentView: View {
var body: some View {
GeometryReader{geometry in
HSplitView(){
Rectangle()
.frame(minWidth: 0, idealWidth: 200, maxWidth: .infinity)
HSplitView(){
Rectangle().layoutPriority(1)
Rectangle().foregroundColor(.green).frame(minWidth:200, idealWidth: 200, maxWidth: .infinity)
}.layoutPriority(1)
}
.frame(width: geometry.size.width, height: geometry.size.height)
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。