Skip to content

Commit

Permalink
Merge pull request #42 from Ditectrev/41-support-ios-15-or-16
Browse files Browse the repository at this point in the history
41 support ios 15 or 16
  • Loading branch information
danieldanielecki authored Jul 8, 2024
2 parents 02d16a9 + 22a9177 commit 24a799c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
6 changes: 4 additions & 2 deletions CloudMaster.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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 = "";
Expand Down
10 changes: 5 additions & 5 deletions CloudMaster/Features/Exam/Views/ExamSummaryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}) {
Expand Down
13 changes: 7 additions & 6 deletions CloudMaster/Features/Exam/Views/ExamView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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()
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion CloudMaster/Features/Intro/Views/IntroView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 24a799c

Please sign in to comment.