-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAQHStack.swift
43 lines (36 loc) · 1.13 KB
/
AQHStack.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// AQHStack.swift
// AQCoreSwiftUIKit (iOS)
//
// Created by Akash Yashavanthrao Shindhe on 29/01/21.
//
import SwiftUI
struct AQHStack: View {
var body: some View {
Form {
SectionView(title: "HStack", description: "A view that arranges its children in a horizontal line.") {
HStack (alignment: .center, spacing: 5){
Circle()
Circle()
Circle()
Circle()
}
}
SectionView(title: "LazyHStack", description: "Same as HStack but items are created only as needed.") {
ScrollView(.horizontal) {
LazyHStack(alignment: .center, spacing: 10) {
ForEach(1...100, id: \.self) {
Circle()
Text("\($0)")
}
}
}
}
}
}
}
struct AQHStack_Previews: PreviewProvider {
static var previews: some View {
AQHStack()
}
}