-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReferenceView.swift
59 lines (56 loc) · 1.99 KB
/
ReferenceView.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
50
51
52
53
54
55
56
57
58
59
//
// ReferenceView.swift
// Spectral
//
// Created by Anne Kubis on 4/13/23.
//
import SwiftUI
struct ReferenceView: View {
@Environment(\.dismiss) var dismiss
var body: some View {
GeometryReader{ geometry in
ScrollView{
VStack{
HStack{
Spacer()
Button{
dismiss()
}label:{
Image(systemName:"x.circle.fill")
.resizable()
.foregroundColor(Color(.blue))
.frame(width: 25, height: 25)
}
}
.padding(.bottom, 10)
Text("Element Sample Set")
.font(.title)
.fontWeight(.bold)
.padding(.bottom, 10)
Divider()
Text("Each vial contains a sample of one element listed below. The Virtual Spectrometer will display the element's absorption lines as shown.")
Divider()
ForEach(elements, id: \.self) { element in
VStack(alignment: .center){
Text("\(element.name)")
.font(.title2)
IndvSpectrumView(chosenElement: element)
.frame(width: geometry.size.width, height: geometry.size.height * 0.05)
Divider()
.padding(5)
}
}
.padding(.bottom, 10)
}
.frame(width: geometry.size.width * 0.8)
.padding(20)
}
.frame(width:geometry.size.width)
}
}
}
struct ReferenceView_Previews: PreviewProvider {
static var previews: some View {
ReferenceView()
}
}