have an error "Cannot find "ThreeTestView" in scope." but it is identified in scope though?
have an error "Cannot find "ThreeTestView" in scope."
Can you provide your source code?
Error View:
//
// GradesView.swift
// FigureTests
//
// Created by Julien Hage on 1/26/23.
//
import SwiftUI
struct GradesView: View {
@Binding var presentationModeView:PresentationMode
@Environment(.presentationMode) var presentationMode
@State var OtestView = false
@State var TtestView = false
@State var ThreetestView = false
@State var grades = 0
var body: some View {
VStack {
Button {
OtestView = true
grades = 1
} label: {
Text("Grade one")
.bold()
}
Button {
TtestView = true
grades = 2
} label: {
Text("Grade two")
.bold()
}
Button {
ThreetestView = true
grades = 3
} label: {
Text("Grade three")
.bold()
}
} .fullScreenCover(isPresented: $OtestView, content: {
OTestView()//(presentationModeView: presentationMode)
}
)
.fullScreenCover(isPresented: $TtestView, content: {
TTestView()//(presentationModeView: presentationMode)
}
)
.fullScreenCover(isPresented: $ThreetestView, content: {
// Error here --> ThreeTestView()
}
)
}
}
Three test view:
struct ThreeTestView: View {
@State var EstartView = false
var body: some View {
VStack {
Text("Hello Students! Today you will be taking a math test! Good Luck!")
Button {
EstartView = true
} label: {
Text("start test")
.bold()
.foregroundColor(.green)
.font(.largeTitle)
}
} .fullScreenCover(isPresented: $EstartView, content: {
ThreeMTestView()//(presentationModeView: presentationMode)
}
)
}
}