-
Notifications
You must be signed in to change notification settings - Fork 1
/
TargetView.swift
49 lines (43 loc) · 1.25 KB
/
TargetView.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
44
45
46
47
48
49
//
// TargetView.swift
// first challange
//
// Created by Yahya Momtaz on 28/10/22.
//
import SwiftUI
struct TargetView: View {
@FocusState var goalIsFocused: Bool
var body: some View {
VStack {
Text("How much do you want to spend in a month?")
.fontWeight(.bold)
.foregroundColor(Color.black)
.multilineTextAlignment(.center)
.font(.system(size: 30))
.lineSpacing(0.1)
VStack {
TextField("Enter your goal!", text: .constant(""))
.frame(height: 100)
.keyboardType(.numberPad)
.font(.system(size: 32.0, weight: .bold))
.focused($goalIsFocused)
}
.padding([.leading, .trailing], universalHeight(height: 20))
.background(Color.white)
Spacer()
}
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
Button("Done") {
goalIsFocused = false
}
}
}
Spacer()
}
}
struct TargetView_Previews: PreviewProvider {
static var previews: some View {
TargetView()
}
}