-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathVideoDetail.swift
More file actions
116 lines (109 loc) · 4.53 KB
/
VideoDetail.swift
File metadata and controls
116 lines (109 loc) · 4.53 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//
// VideoDetail.swift
// Youtube-Example
//
// Created by shayanbo on 2023/7/26.
//
import SwiftUI
struct VideoDetail: View {
let width: CGFloat
var body: some View {
List {
Group {
Text("Official Evo Moment #37, Daigo vs Justin Evo 2004 in HD")
.fontWeight(.medium)
.multilineTextAlignment(.leading)
.font(.system(size: 18))
.foregroundColor(.black)
.padding(.all, 10)
Text("6.59M Views 7 years ago ...Unfold")
.fontWeight(.regular)
.font(.system(size: 10))
.foregroundColor(.gray)
.padding(.leading, 10)
HStack {
Image("demo")
.resizable()
.frame(width: 30, height: 30)
.cornerRadius(15)
Text("evo2kvids")
.fontWeight(.regular)
.font(.system(size: 10))
.foregroundColor(.black)
Text("74.4k")
.fontWeight(.regular)
.font(.system(size: 10))
.foregroundColor(.gray)
Spacer()
Button { } label: {
Text("Subscribe")
.fontWeight(.medium)
.foregroundColor(.white)
.padding(.horizontal, 10)
.padding(.vertical, 5)
.background(
Rectangle().fill(.black).cornerRadius(17)
)
}
}
.padding(.all, 10)
ScrollView(.horizontal, showsIndicators: false) {
LazyHStack {
ForEach (0..<10) { i in
Button { } label: {
Text("Action_\(i)")
.fontWeight(.regular)
.font(.system(size:12))
.foregroundColor(.black)
.padding(.horizontal, 10)
.padding(.vertical, 5)
.background(
Rectangle().fill(.gray.opacity(0.15)).cornerRadius(17)
)
}
}
}
}
.padding(.leading, 10)
.padding(.bottom, 20)
ForEach(0..<10) { _ in
VStack(spacing:0) {
Rectangle().fill(.gray.opacity(0.15))
.frame(width: width, height: width * 0.5625)
HStack(spacing:0) {
Image("demo")
.resizable()
.frame(width: 30, height: 30)
.cornerRadius(15)
Spacer(minLength: 0)
VStack(alignment: .leading) {
Text("EVO 2004: Daigo Umehara VS. Justin Wong - Alternate Viewpoint!")
.fontWeight(.regular)
.multilineTextAlignment(.leading)
.font(.system(size: 13))
.foregroundColor(.black)
Text("MarkMan23・1.02M Views 4 years ago")
.fontWeight(.regular)
.font(.system(size: 10))
.foregroundColor(.gray)
}
Spacer(minLength: 0)
Image(systemName: "ellipsis")
.rotationEffect(.degrees(90))
.frame(width: 30)
}
.padding(.all, 10)
}
}
}
.listRowSeparator(.hidden)
.listRowBackground(Color.white)
.listRowInsets(.init())
.foregroundColor(.black)
}
.environment(\.defaultMinListRowHeight, 1)
.listStyle(.plain)
.background(.white)
.scrollContentBackground(.hidden)
}
}