diff --git a/Splits.xcodeproj/project.pbxproj b/Splits.xcodeproj/project.pbxproj index 64c4fc1..efeffc0 100644 --- a/Splits.xcodeproj/project.pbxproj +++ b/Splits.xcodeproj/project.pbxproj @@ -308,7 +308,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = LVSXT10g; PRODUCT_BUNDLE_IDENTIFIER = Brandlar.Splits; PRODUCT_NAME = "$(TARGET_NAME)"; RUN_DOCUMENTATION_COMPILER = YES; @@ -341,7 +341,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = LVSXT10g; PRODUCT_BUNDLE_IDENTIFIER = Brandlar.Splits; PRODUCT_NAME = "$(TARGET_NAME)"; RUN_DOCUMENTATION_COMPILER = YES; diff --git a/Splits/ChangeLogData.swift b/Splits/ChangeLogData.swift index fa3bb55..93676ff 100644 --- a/Splits/ChangeLogData.swift +++ b/Splits/ChangeLogData.swift @@ -7,6 +7,25 @@ import SwiftUI +struct May2022: View { + var body: some View { + ScrollView { + //2022-05-22 + HStack { + VStack (alignment: .leading) { + Text("2022-05-22") + .font(.title2) + Text("Version Prerelease Build LVSXT10g\n") + .font(.footnote) + Text("\u{2022} Undid changes made in Build LVSXT10j.\n\u{2022} Failed to implement a way to dismiss the keyboard.\n\u{2022} Started work on a conversion process of paces to the opposite selected system of measurement. (does not currently work)") + } + Spacer() + } + .padding(30) + } + } +} + struct April2022: View { var body: some View { ScrollView { diff --git a/Splits/ChangeLogView.swift b/Splits/ChangeLogView.swift index 23d597e..4098280 100644 --- a/Splits/ChangeLogView.swift +++ b/Splits/ChangeLogView.swift @@ -12,6 +12,7 @@ struct ChangeLog: View { NavigationView { List { Section(header: Text("2022")) { + NavigationLink("May", destination: May2022()) NavigationLink("April", destination: April2022()) } } diff --git a/Splits/ContentView.swift b/Splits/ContentView.swift index 9ba4e79..d337919 100644 --- a/Splits/ContentView.swift +++ b/Splits/ContentView.swift @@ -67,54 +67,45 @@ struct PaceResults: View { @Binding var distance: String var body: some View { + let distanceDub = Double(distance) ?? 1.0 - //var pacePerUnit = 0.0 - //var notSelectedSystem = "" + var notSelectedSystem = "" + var pacePerUnit = 0.0 - func secondsConversion(timeSeconds: String) -> (timeSecondsInt: Int, timeSecondsUnderSixty: Int) { - let convertedSeconds = (Double(timeSeconds) ?? 0) * (1+(2/3)) - let timeSecondsInt = Int(timeSeconds) ?? 0 - let timeSecondsUnderSixty = (timeSecondsInt % 60) - return (timeSecondsInt, timeSecondsUnderSixty) - } + let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.666666666666666666666666) + let timeSecondsInt:Int = Int(timeSeconds) ?? 0 + let timeSecondsUnderSixty:Int = (timeSecondsInt % 60) - func minutesConversion(secondsConversion) { - let timeSecondsToMinutes = (timeSecondsInt - timeSecondsUnderSixty) / 60 + let timeSecondsToMinutes:Int = (timeSecondsInt - timeSecondsUnderSixty) / 60 - let timeMinutesDouble = Double(timeMinutes) ?? 0.0 + let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0 - let timeMinutesInt = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes) - let timeMinutesUnderSixty = timeMinutesInt % 60 - let timeMinutesToHours = (timeMinutesInt - timeMinutesUnderSixty) / 60 - - return (timeMinutesUnderSixty, timeMinutesDouble, timeMinutesToHours) - } + let timeMinutesInt:Int = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes) + let timeMinutesUnderSixty:Int = timeMinutesInt % 60 + let timeMinutesToHours:Int = (timeMinutesInt - timeMinutesUnderSixty) / 60 + let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty) - let leadingZeros = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty) + let actualTime:Double = timeMinutesDouble + (convertedSeconds / 100) + let pace:Double = actualTime / distanceDub + let paceString:String = String(format: "%.2f", pace) - let actualTime = timeMinutesDouble + (convertedSeconds / 100) - let pace = actualTime / (Double(distance) ?? 1) - let paceString = String(format: "%.2f", pace) - - /* if selectedSystem == "km" { - pacePerUnit = actualTime / (distance * 1.609344) + pacePerUnit = actualTime / (distanceDub * 1.609344) notSelectedSystem = "mi" } else { - pacePerUnit = actualTime / (distance * 0.6213711922) + pacePerUnit = actualTime / (distanceDub * 0.6213711922) notSelectedSystem = "km" } let pacePerUnitString = String(format: "%.02f", pacePerUnit) - */ VStack { Text("Distance: \(distance)\(selectedSystem)") Text("Total time: \(timeMinutesToHours):\(leadingZeros)") Text("\(paceString) minutes per \(selectedSystem)") - //Text("\(pacePerUnitString) minutes per \(notSelectedSystem)") + Text("\(pacePerUnitString) minutes per \(notSelectedSystem)") } } } diff --git a/Splits/ModalView.swift b/Splits/ModalView.swift index 05abc52..da8b7f9 100644 --- a/Splits/ModalView.swift +++ b/Splits/ModalView.swift @@ -117,7 +117,7 @@ struct problemView: View { .font(.largeTitle) .bold() .padding(.top, 40) - Text("\n\u{2022} You can not dismiss the keyboard\n\t\u{2022} This hides the tab bar at the bottom so you can't navigate the app\n\u{2022} Entering a number that is too large (20 digits) into the minutes field will cause the app to crash") + Text("\n\u{2022} You can not dismiss the keyboard\n\t\u{2022} This hides the tab bar at the bottom so you can't navigate the app") .padding() } }