09:SwiftUI-ScrollviewPage
正文
// // ScrollviewPage.swift // SwiftUIDeom // // Created by zhoukang03 on 2023/3/27. // // 9:滚动视图 import SwiftUI struct ScrollviewPage: View { var body: some View { ScrollView { Text("SwiftUI-Scrollview").padding(20) // Divider()是一个分割线视图 Divider() Image("icon") .resizable() .frame(width: 50, height: 50, alignment: .center) Divider() VStack { Text("Views and controls are the visual building blocks of your app’s user interface.") .lineLimit(10) .fixedSize(horizontal: false, vertical: true) // 在某个方向上充满展示 } } .border(Color.gray.gradient, width: 1) .cornerRadius(10) .padding(10) .navigationTitle("滚动视图") } } #if DEBUG struct ScrollviewPage_Previews: PreviewProvider { static var previews: some View { ScrollviewPage() } } #endif