diff --git a/CloudMaster.xcodeproj/project.pbxproj b/CloudMaster.xcodeproj/project.pbxproj index f7b59bd..24bda7b 100644 --- a/CloudMaster.xcodeproj/project.pbxproj +++ b/CloudMaster.xcodeproj/project.pbxproj @@ -786,11 +786,12 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = com.ditectrev.cloudmasterswift; PRODUCT_NAME = "CloudMaster Swift"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -821,11 +822,12 @@ INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.4; + MARKETING_VERSION = 1.0.5; PRODUCT_BUNDLE_IDENTIFIER = com.ditectrev.cloudmasterswift; PRODUCT_NAME = "CloudMaster Swift"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/CloudMaster/Features/Exam/Views/ExamSummaryView.swift b/CloudMaster/Features/Exam/Views/ExamSummaryView.swift index d1eff3b..d6cd63c 100644 --- a/CloudMaster/Features/Exam/Views/ExamSummaryView.swift +++ b/CloudMaster/Features/Exam/Views/ExamSummaryView.swift @@ -12,7 +12,7 @@ struct ExamSummaryView: View { // Helper variable to hide backbutton after Exam let afterExam: Bool - @Environment(\.presentationMode) var presentationMode + @Environment(\.presentationMode) var presentationMode var body: some View { VStack { @@ -87,10 +87,10 @@ struct ExamSummaryView: View { .navigationBarTitleDisplayMode(.inline) .navigationBarBackButtonHidden(afterExam) // Hide back button based on the flag .toolbar { - if (!afterExam){ - ToolbarItem(placement: .principal) { - HStack { - Spacer() + ToolbarItem(placement: .principal) { + HStack { + Spacer() + if !afterExam { Button(action: { showDeleteConfirmation = true }) { diff --git a/CloudMaster/Features/Exam/Views/ExamView.swift b/CloudMaster/Features/Exam/Views/ExamView.swift index 4e3830d..3cfdde7 100644 --- a/CloudMaster/Features/Exam/Views/ExamView.swift +++ b/CloudMaster/Features/Exam/Views/ExamView.swift @@ -26,7 +26,7 @@ struct ExamView: View { } var body: some View { - NavigationStack { + NavigationView { VStack { if !questionLoader.questions.isEmpty { let questions = Array(questionLoader.questions.prefix(questionCount)) @@ -78,6 +78,12 @@ struct ExamView: View { .foregroundColor(.white) .cornerRadius(10) } + + if let examData = lastExamData { + NavigationLink(destination: ExamSummaryView(exam: examData, afterExam: true), isActive: $navigateToSummary) { + EmptyView() + } + } } Spacer() @@ -92,11 +98,6 @@ struct ExamView: View { Text("No Questions available! Please download course") } } - .navigationDestination(isPresented: $navigateToSummary) { - if let examData = lastExamData { - ExamSummaryView(exam: examData, afterExam: true) - } - } } .onAppear(perform: startTimer) .onDisappear { diff --git a/CloudMaster/Features/Intro/Views/IntroView.swift b/CloudMaster/Features/Intro/Views/IntroView.swift index b42a930..69f733c 100644 --- a/CloudMaster/Features/Intro/Views/IntroView.swift +++ b/CloudMaster/Features/Intro/Views/IntroView.swift @@ -34,7 +34,7 @@ struct IntroView: View { viewModel.downloadCourses(favorites) } } - .onChange(of: viewModel.downloadCompleted) { completed, _ in + .onChange(of: viewModel.downloadCompleted) { completed in if completed { isAppConfigured = true }