-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFriendTree.swift
More file actions
117 lines (88 loc) · 3.25 KB
/
FriendTree.swift
File metadata and controls
117 lines (88 loc) · 3.25 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
117
//
// FriendTree.swift
// Happy Tree
//
// Created by Thach Quynh Anh on 11/13/22.
//
import Foundation
import SwiftUI
struct FriendTree1: View{
@State private var share = ""
var body: some View{
NavigationView {
ZStack {
Color(red: 1, green: 0.90, blue: 1.0)
.ignoresSafeArea()
VStack{
Text("Tayloe's Tree")
.font(.system(size: 20, design: .rounded))
.fontWeight(.semibold)
.padding()
.kerning(1.2)
.frame(width: 200, height: 80)
.multilineTextAlignment(.center)
.background(Color.white)
.cornerRadius(15)
.foregroundColor(Color.purple)
Image("Tayloe's Tree")
.scaledToFill()
TextField("Write something to Tayloe", text: $share)
.padding()
.multilineTextAlignment(.center)
.frame(width: 300, height: 100)
.background(Color.white)
.cornerRadius(20)
Button("Send"){
}
.foregroundColor(.white)
.frame(width: 120, height: 40)
.background(Color.purple)
.cornerRadius(20)
}
}
}
}
}
struct FriendTree2: View{
@State private var share = ""
var body: some View{
NavigationView {
ZStack {
Color(red: 1, green: 0.90, blue: 1.0)
.ignoresSafeArea()
VStack{
Text("Clara's Tree")
.font(.system(size: 20, design: .rounded))
.fontWeight(.semibold)
.padding()
.kerning(1.2)
.frame(width: 320, height: 110)
.multilineTextAlignment(.center)
.background(Color.white)
.cornerRadius(15)
.foregroundColor(Color.purple)
Image("happyTree-1")
.scaledToFill()
TextField("Write something to Clara", text: $share)
.padding()
.multilineTextAlignment(.center)
.frame(width: 300, height: 100)
.background(Color.white)
.cornerRadius(20)
Button("Send"){
}
.foregroundColor(.white)
.frame(width: 120, height: 40)
.background(Color.purple)
.cornerRadius(20)
}
}
}
}
}
struct FriendTree_Previews: PreviewProvider {
static var previews: some View {
FriendTree1()
FriendTree2()
}
}