Fixed pace showing, added conversions between distance and pace. Added a new SecretView with some semi-private info. App is now in Version 1.0.0
This commit is contained in:
parent
7b421a0a73
commit
b77ef882e8
62 changed files with 2021 additions and 82 deletions
|
|
@ -0,0 +1,27 @@
|
|||
let distanceDub = Double(distance) ?? 1.0
|
||||
|
||||
let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.666666666666666666666666)
|
||||
let timeSecondsInt:Int = Int(timeSeconds) ?? 0
|
||||
let timeSecondsUnderSixty:Int = (timeSecondsInt % 60)
|
||||
|
||||
let timeSecondsToMinutes:Int = (timeSecondsInt - timeSecondsUnderSixty) / 60
|
||||
|
||||
let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0
|
||||
|
||||
let timeMinutesInt:Int = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes)
|
||||
let timeMinutesUnderSixty:Int = timeMinutesInt % 60
|
||||
let timeMinutesToHours:Int = (timeMinutesInt - timeMinutesUnderSixty) / 60
|
||||
|
||||
let totalHours:Double = Double(timeMinutesToHours) + (Double(timeHours) ?? 0)
|
||||
|
||||
let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty)
|
||||
|
||||
let actualTime:Double = timeMinutesDouble + (convertedSeconds / 100) + ((Double(timeHours) ?? 0) * 60)
|
||||
let pace = actualTime / distanceDub
|
||||
|
||||
let paceWhole = (pace.rounded(.down))
|
||||
let paceMinutes = paceWhole % 60
|
||||
let paceHours = (paceWhole - paceMinutes) / 60
|
||||
|
||||
let paceString:String = String(format: "%.2f", pace)
|
||||
let hoursFormatted:String = String(format: "%.0f", totalHours)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<playground version='5.0' target-platform='ios' buildActiveScheme='true' importAppTypes='true'>
|
||||
<timeline fileName='timeline.xctimeline'/>
|
||||
</playground>
|
||||
|
|
@ -12,6 +12,8 @@
|
|||
850F8014284A7F6A0094580D /* DocsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850F8013284A7F6A0094580D /* DocsView.swift */; };
|
||||
850F8016284A815C0094580D /* KnownIssues.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850F8015284A815C0094580D /* KnownIssues.swift */; };
|
||||
850F8018284A83400094580D /* FeaturesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850F8017284A83400094580D /* FeaturesView.swift */; };
|
||||
850F80202853F7790094580D /* LicenseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850F801F2853F7790094580D /* LicenseView.swift */; };
|
||||
850F80222853F7E30094580D /* SecretView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 850F80212853F7E30094580D /* SecretView.swift */; };
|
||||
85AAA0D627FA2DD600F4B9A1 /* SplitsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AAA0D527FA2DD600F4B9A1 /* SplitsApp.swift */; };
|
||||
85AAA0D827FA2DD600F4B9A1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AAA0D727FA2DD600F4B9A1 /* ContentView.swift */; };
|
||||
85AAA0DA27FA2DDA00F4B9A1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 85AAA0D927FA2DDA00F4B9A1 /* Assets.xcassets */; };
|
||||
|
|
@ -27,6 +29,8 @@
|
|||
850F8013284A7F6A0094580D /* DocsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocsView.swift; sourceTree = "<group>"; };
|
||||
850F8015284A815C0094580D /* KnownIssues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KnownIssues.swift; sourceTree = "<group>"; };
|
||||
850F8017284A83400094580D /* FeaturesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturesView.swift; sourceTree = "<group>"; };
|
||||
850F801F2853F7790094580D /* LicenseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenseView.swift; sourceTree = "<group>"; };
|
||||
850F80212853F7E30094580D /* SecretView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecretView.swift; sourceTree = "<group>"; };
|
||||
85AAA0D227FA2DD600F4B9A1 /* Splits.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Splits.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
85AAA0D527FA2DD600F4B9A1 /* SplitsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitsApp.swift; sourceTree = "<group>"; };
|
||||
85AAA0D727FA2DD600F4B9A1 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -73,9 +77,11 @@
|
|||
850062C82802328F0095F121 /* TabViewData.swift */,
|
||||
850F8017284A83400094580D /* FeaturesView.swift */,
|
||||
850F8013284A7F6A0094580D /* DocsView.swift */,
|
||||
850F80212853F7E30094580D /* SecretView.swift */,
|
||||
850F8015284A815C0094580D /* KnownIssues.swift */,
|
||||
85AAA0E727FA2F1600F4B9A1 /* ChangeLogView.swift */,
|
||||
85AAA0E527FA2EB100F4B9A1 /* ModalView.swift */,
|
||||
850F801F2853F7790094580D /* LicenseView.swift */,
|
||||
85AAA0D927FA2DDA00F4B9A1 /* Assets.xcassets */,
|
||||
85AAA0DB27FA2DDA00F4B9A1 /* Preview Content */,
|
||||
);
|
||||
|
|
@ -166,6 +172,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
850F80222853F7E30094580D /* SecretView.swift in Sources */,
|
||||
85AAA0D827FA2DD600F4B9A1 /* ContentView.swift in Sources */,
|
||||
85AAA0D627FA2DD600F4B9A1 /* SplitsApp.swift in Sources */,
|
||||
850062C92802328F0095F121 /* TabViewData.swift in Sources */,
|
||||
|
|
@ -174,6 +181,7 @@
|
|||
850F8016284A815C0094580D /* KnownIssues.swift in Sources */,
|
||||
85AAA0E827FA2F1600F4B9A1 /* ChangeLogView.swift in Sources */,
|
||||
85AAA0E627FA2EB100F4B9A1 /* ModalView.swift in Sources */,
|
||||
850F80202853F7790094580D /* LicenseView.swift in Sources */,
|
||||
850F8018284A83400094580D /* FeaturesView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -231,7 +239,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -239,6 +247,7 @@
|
|||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
|
@ -286,13 +295,14 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.4;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
RUN_DOCUMENTATION_COMPILER = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
|
@ -302,6 +312,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Splits/Preview Content\"";
|
||||
|
|
@ -315,14 +326,15 @@
|
|||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = LVSXT10g;
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = Brandlar.Splits;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
RUN_DOCUMENTATION_COMPILER = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
|
@ -335,6 +347,7 @@
|
|||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Splits/Preview Content\"";
|
||||
|
|
@ -348,14 +361,15 @@
|
|||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.5;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = LVSXT10g;
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = Brandlar.Splits;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
RUN_DOCUMENTATION_COMPILER = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
|
|
|||
|
|
@ -9,47 +9,89 @@
|
|||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>5</integer>
|
||||
<integer>6</integer>
|
||||
</dict>
|
||||
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>6</integer>
|
||||
<integer>7</integer>
|
||||
</dict>
|
||||
<key>SnapKitPlayground (Playground) 3.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
<key>SnapKitPlayground (Playground) 4.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>8</integer>
|
||||
</dict>
|
||||
<key>SnapKitPlayground (Playground) 5.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>9</integer>
|
||||
</dict>
|
||||
<key>SnapKitPlayground (Playground).xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>4</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>Splits.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground) 1.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>2</integer>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground) 2.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>3</integer>
|
||||
<integer>4</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground) 3.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>10</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground) 4.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>11</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground) 5.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>12</integer>
|
||||
</dict>
|
||||
<key>SwiftRichString (Playground).xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,57 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// it is considered self-explanatory and best viewed in-app
|
||||
|
||||
struct June2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-06-10
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-10")
|
||||
.font(.title2)
|
||||
Text("Version 1.0.0 (LVSXT10a)\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Got the conversion of paces to work, so a 5:00/km pace will also show as 8:03/mi\n\u{2022} This app is now considered \"Finished\" and will transition to Version Numbers")
|
||||
}
|
||||
}
|
||||
//2022-06-09
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-09")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease LVSXT10c.2\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Worked on a simple login page to view contact info\n\t\u{2022} Spent *way* too long on it")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-08
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-08")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10c\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Finished with a conversion of the pace to be a more readable format (i.e. 5:45 instead of 5.75)!\n\t\u{2022} This is probably one of the biggest things to increase readability in the app\n\u{2022} Installed a Software License")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
//2022-06-05
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-05")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10d.3\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Started work on converting the pace to a more understandable format\n\u{2022} ")
|
||||
}
|
||||
}
|
||||
//2022-06-04
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
|
|
@ -130,7 +177,7 @@ struct April2022: View {
|
|||
//2022-04-09
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-09:")
|
||||
Text("2022-04-09")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10n\n")
|
||||
.font(.footnote)
|
||||
|
|
@ -143,7 +190,7 @@ struct April2022: View {
|
|||
//2022-04-08
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-08:")
|
||||
Text("2022-04-08")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10r\n")
|
||||
.font(.footnote)
|
||||
|
|
@ -156,7 +203,7 @@ struct April2022: View {
|
|||
//2022-04-05
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-05:")
|
||||
Text("2022-04-05")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10u.2\n")
|
||||
.font(.footnote)
|
||||
|
|
@ -169,11 +216,43 @@ struct April2022: View {
|
|||
//2022-04-03
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-03:")
|
||||
Text("2022-04-03")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10u\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Fixed math\n\u{2022} Implemented change log view\n\u{2022} Restructured code so it gave fewer errors\n\u{2022} Added correct pace data\n\t\u{2022} At this time, the seconds functionality is entirely broken\n\u{2022} Implemented total time view\n\t\u{2022} For some reason, the view for the minutes automatically fills in for the hours as well")
|
||||
Text("\u{2022} Moved app production over from Swift Playgrounds on iPad to Xcode on Mac\n\u{2022} Fixed math\n\u{2022} Implemented change log view\n\u{2022} Restructured code so it gave fewer errors\n\u{2022} Added correct pace data\n\t\u{2022} At this time, the seconds functionality is entirely broken\n\u{2022} Implemented total time view\n\t\u{2022} For some reason, the view for the minutes automatically fills in for the hours as well")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct March2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-03-26
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-03-26:2022-03-31")
|
||||
.font(.title2)
|
||||
Text("Version [UNNAMED]\n")
|
||||
.font(.footnote)
|
||||
Text("Things were made, fixed, broken, removed, etc. I don't know what happened because I had no system in place to track changes")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-03-25
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-03-25")
|
||||
.font(.title2)
|
||||
Text("Version [UNNAMED]\n")
|
||||
.font(.footnote)
|
||||
Text("App production started. Textfields were mostly implemented but didn't do anything. Also started on the help page.")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,26 +6,24 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
struct ChangeLog: View {
|
||||
var body: some View {
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("Change Log")
|
||||
.font(.largeTitle)
|
||||
.bold()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding()
|
||||
List {
|
||||
Section(header: Text("2022")) {
|
||||
NavigationLink("June", destination: June2022())
|
||||
NavigationLink("May", destination: May2022())
|
||||
NavigationLink("April", destination: April2022())
|
||||
NavigationLink("March", destination: March2022())
|
||||
}
|
||||
}
|
||||
.listStyle(.insetGrouped)
|
||||
.navigationTitle("Change Log")
|
||||
}
|
||||
}
|
||||
struct ChangeLog_Previews: PreviewProvider {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import Foundation
|
|||
|
||||
struct ContentView: View {
|
||||
var SISystem = ["km","mi"]
|
||||
var minutes = Array(0...300)
|
||||
var times = Array(0...300).map { String($0) }
|
||||
@State var timeHours: String = ""
|
||||
@State var timeMinutes: String = ""
|
||||
@State var timeSeconds: String = ""
|
||||
|
|
@ -80,32 +78,100 @@ struct PaceResults: View {
|
|||
|
||||
var body: some View {
|
||||
let distanceDub = Double(distance) ?? 1.0
|
||||
// because of some conversions I have to do,
|
||||
// this constant is a double just to make things easier.
|
||||
// this has to be one because the pace is calculated
|
||||
// by time / distance, and you can't divide by 0.
|
||||
// I could just make the TextField have a default value
|
||||
// but then my message would disappear to let you know
|
||||
// what to enter in that box
|
||||
|
||||
let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.666666666666666666666666)
|
||||
let multiplier = {selectedSystem == "mi" ? 1.609344 : 0.6213711922}()
|
||||
let notSelectedSystem = {selectedSystem == "km" ? "mi" : "km"}()
|
||||
let convertedDistance = distanceDub * multiplier
|
||||
let convertedDistanceString = {distance == "" ? "" : String(format: "%.2f", convertedDistance)}()
|
||||
|
||||
let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.6666666666666666666666666)
|
||||
let timeSecondsInt:Int = Int(timeSeconds) ?? 0
|
||||
let timeSecondsUnderSixty:Int = (timeSecondsInt % 60)
|
||||
// this section takes the seconds and multiplies it by 1.66
|
||||
// so that 60 seconds becomes 100 (as in 100% of a minute)
|
||||
// and this means that 30 seconds becomes 50 (as in 50% of a minute)
|
||||
// which allows us to to calculate our pace. Without this
|
||||
// the pace would be all wrong.
|
||||
|
||||
let timeSecondsToMinutes:Int = (timeSecondsInt - timeSecondsUnderSixty) / 60
|
||||
|
||||
let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0
|
||||
// this takes the seconde and converts it to minutes so 78
|
||||
// seconds will turn into 1 minute and 18 seconds leftover
|
||||
// with the minutes saved in this value and the seconds
|
||||
// disregarded because they're saved in timeSecondsUnderSixty
|
||||
|
||||
let timeMinutesInt:Int = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes)
|
||||
let timeMinutesUnderSixty:Int = timeMinutesInt % 60
|
||||
let timeMinutesToHours:Int = (timeMinutesInt - timeMinutesUnderSixty) / 60
|
||||
// this section tales the minutes (which it combines the
|
||||
// minutes with the timeSecondsToMinutes) then finds out how
|
||||
// many hours (multiples of 60) are in the minutes value
|
||||
// and saves the hours in timeMinutesToHours and the remaining
|
||||
// minutes in timeMinutesUnderSixty
|
||||
|
||||
let totalHours:Double = Double(timeMinutesToHours) + (Double(timeHours) ?? 0)
|
||||
|
||||
let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty)
|
||||
let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0
|
||||
// this line of code takes the binding $timeMinutes which
|
||||
// is a string and turns it into a number of type Double.
|
||||
// while the TextField is a number pad, on iPads, Mac computers
|
||||
// and using copy/paste you can get other characters.
|
||||
// if the text field contains anything other than a number
|
||||
// or a single decimal, this value instantly becomes 0.0
|
||||
|
||||
let actualTime:Double = timeMinutesDouble + (convertedSeconds / 100) + ((Double(timeHours) ?? 0) * 60)
|
||||
let pace:Double = actualTime / distanceDub
|
||||
let paceString:String = String(format: "%.2f", pace)
|
||||
let hoursFormatted:String = String(format: "%.0f", totalHours)
|
||||
// adds the minutes, hours, and seconds all together to get
|
||||
// a single value in terms of minutes, so that 1:08:45
|
||||
// becomes 68.75 which is a nice number we can do math on
|
||||
// and this number is never directly seen by the user
|
||||
let pace = actualTime / distanceDub
|
||||
let paceOpposite = (selectedSystem == "km" ? (pace * 1.609344) : (pace * 0.6213711922))
|
||||
|
||||
let paceSeconds = pace.truncatingRemainder(dividingBy: 1.0)
|
||||
let paceMinutes = (pace.truncatingRemainder(dividingBy: 60.0) - paceSeconds)
|
||||
let paceHours = String(format: "%.0f", ((pace - paceMinutes) / 60))
|
||||
let reConvertedSeconds = (paceSeconds / 1.666666666666666666) * 100
|
||||
|
||||
let properTimeMS = String(format: "%02d:%02d", Int(paceMinutes), Int(reConvertedSeconds.rounded()))
|
||||
|
||||
let paceSecondsOpposite = paceOpposite.truncatingRemainder(dividingBy: 1.0)
|
||||
let paceMinutesOpposite = (paceOpposite.truncatingRemainder(dividingBy: 60.0) - paceSecondsOpposite)
|
||||
let paceHoursOpposite = String(format: "%.0f", ((paceOpposite - paceMinutesOpposite) / 60))
|
||||
let reConvertedSecondsOpposite = (paceSecondsOpposite / 1.666666666666666666) * 100
|
||||
|
||||
let properTimeMSOpposite = String(format: "%02d:%02d", Int(paceMinutesOpposite), Int(reConvertedSecondsOpposite.rounded()))
|
||||
|
||||
//let paceString:String = String(format: "%.2f", pace)
|
||||
let totalHours:Double = Double(timeMinutesToHours) + (Double(timeHours) ?? 0)
|
||||
// this takes the number of hours in the binding $timeHours
|
||||
// and the hours calculated in the previous section
|
||||
// and adds them together to get our total number of hours.
|
||||
let hoursFormatted:String = String(format: "%.0f", totalHours)
|
||||
let paceFormatted:String = {pace >= 60 ? "\(paceHours):\(properTimeMS)" : "\(properTimeMS)"}()
|
||||
|
||||
let paceFormattedOpposite:String = {paceOpposite >= 60 ? "\(paceHoursOpposite):\(properTimeMSOpposite)" : "\(properTimeMSOpposite)"}()
|
||||
|
||||
let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty)
|
||||
// this takes the minutes and the seconds and adds leading
|
||||
// zeros to them, so that 5 minutes 7 seconds will show
|
||||
// as 05:07 which is a format most people, and certainly
|
||||
// the people this app is intended for, will understand
|
||||
|
||||
HStack {
|
||||
VStack {
|
||||
Text("Distance: \(distance)\(selectedSystem)")
|
||||
Text("Converted distance: \(convertedDistanceString)\(notSelectedSystem)")
|
||||
}
|
||||
Text("Total time: \(hoursFormatted):\(leadingZeros)")
|
||||
Text("\(paceString) minutes per \(selectedSystem)")
|
||||
.padding()
|
||||
VStack {
|
||||
Text("\(paceFormatted) per \(selectedSystem)")
|
||||
Text("\(paceFormattedOpposite) per \(notSelectedSystem)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -115,36 +181,3 @@ struct ContentView_Previews: PreviewProvider {
|
|||
ContentView()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
struct AllTheMath {
|
||||
@Binding var timeHours: String
|
||||
@Binding var timeMinutes: String
|
||||
@Binding var timeSeconds: String
|
||||
@Binding var selectedSystem: String
|
||||
@Binding var distance: String
|
||||
|
||||
let distanceDub = Double(distance) ?? 1.0
|
||||
|
||||
let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.666666666666666666666666)
|
||||
let timeSecondsInt:Int = Int(timeSeconds) ?? 0
|
||||
let timeSecondsUnderSixty:Int = (timeSecondsInt % 60)
|
||||
|
||||
let timeSecondsToMinutes:Int = (timeSecondsInt - timeSecondsUnderSixty) / 60
|
||||
|
||||
let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0
|
||||
|
||||
let timeMinutesInt:Int = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes)
|
||||
let timeMinutesUnderSixty:Int = timeMinutesInt % 60
|
||||
let timeMinutesToHours:Int = (timeMinutesInt - timeMinutesUnderSixty) / 60
|
||||
|
||||
let totalHours:Double = Double(timeMinutesToHours) + (Double(timeHours) ?? 0)
|
||||
|
||||
let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty)
|
||||
|
||||
let actualTime:Double = timeMinutesDouble + (convertedSeconds / 100) + ((Double(timeHours) ?? 0) * 60)
|
||||
let pace:Double = actualTime / distanceDub
|
||||
let paceString:String = String(format: "%.2f", pace)
|
||||
let hoursFormatted:String = String(format: "%.0f", totalHours)
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -6,8 +6,17 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
let username = "admin"
|
||||
let password = "123"
|
||||
|
||||
struct DocsView: View {
|
||||
@State var pass: String = ""
|
||||
@State var user: String = ""
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List {
|
||||
|
|
@ -26,10 +35,18 @@ struct DocsView: View {
|
|||
NavigationLink("Low Priority", destination: LowPriority())
|
||||
}
|
||||
Section(header: Text("App Information")) {
|
||||
Text("Version: Prerelease LVSXT10d.2")
|
||||
Text("Release date: 2022-06-04")
|
||||
NavigationLink("Software License", destination: LicenseView())
|
||||
Text("Version: 1.0.0")
|
||||
Text("Release date: 2022-06-10")
|
||||
Text("Start date: 2022-03-25")
|
||||
Text("App files: 9")
|
||||
Link("Built with SwiftUI \(Image(systemName: "swift"))", destination: URL(string: "https://developer.apple.com/xcode/swiftui")!)
|
||||
}
|
||||
Section(header: Text("Login")) {
|
||||
SecureField("Username", text: $user)
|
||||
SecureField("Password", text: $pass)
|
||||
if (pass == password && user == username) {
|
||||
NavigationLink("Contacts", destination: SecretView())
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("Docs")
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ struct NewFeatures: View {
|
|||
.padding(.top, 40)
|
||||
VStack(alignment: .leading) {
|
||||
Text("\u{2022} Reformatted the Docs tabs and made the common things up at the top")
|
||||
Text("Implemented in Version Prerelease LVSXT10d.2 (current version)\n")
|
||||
Text("Implemented in Version Prerelease LVSXT10d.2\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
Text("\u{2022} Added the Features, Known Issues, and moved the Change Log for better navigation")
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// it is considered self-explanatory and best viewed in-app
|
||||
|
||||
struct RecentlyResolved: View {
|
||||
var body: some View {
|
||||
|
|
|
|||
111
Splits/LicenseView.swift
Normal file
111
Splits/LicenseView.swift
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
//
|
||||
// LicenseView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/9/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LicenseView: View {
|
||||
var fontSize:CGFloat {UIScreen.main.bounds.width > 700 ? 18 : 8}
|
||||
// figuring out how to do this came partly from tinyurl.com/9snwkrzt
|
||||
// and also partly from stackoverflow.com/questions/57727107/
|
||||
// then I remembered about ternary operators and I optimized it
|
||||
// This allows the license to be properly formatted
|
||||
// on any screen size by getting the resolution then
|
||||
// setting fontSize to a value based on that where the whole
|
||||
// line can be viewed without scrolling horizontally
|
||||
// or with wrapped text, ruining the required formatting I have.
|
||||
// As of 2022-06-08, I have not tested this on a phone.
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
--------------------------------------------------------------------
|
||||
| THIS WORK, AND ALL SUBSEQUENT RELEASES, VERSIONS, MODIFICATIONS, |
|
||||
| AND UPDATES ARE COPYRIGHT © ISAAC GREENE, AND MAY BE RELEASED |
|
||||
| UNDER THIS LICENSE. |
|
||||
| |
|
||||
| COPIES OF THIS SOURCE CODE MAY BE MADE AVAILABLE BY WRITTEN |
|
||||
| REQUEST TO ISAAC GREENE. ISAAC GREENE IS GIVEN FULL DISCRETION |
|
||||
| TO APPROVE OR DENY THESE REQUESTS. |
|
||||
| CHANGES MAY BE MADE TO THIS LICENSE AT ANY TIME WITHOUT |
|
||||
| NOTICE OR WARNING. |
|
||||
| |
|
||||
| BY ANY USE OF THIS SOFTWARE AND/OR LICENSE YOU AGREE THAT: |
|
||||
| 1. YOU ARE SUBJECT TO THE TERMS PUT FORTH IN THIS LICENSE. |
|
||||
| 2. YOU HAVE NO GUARANTEED RIGHTS REGARDING THE USE OF THIS |
|
||||
| APPLICATION OR LICENSE. |
|
||||
| 3. YOUR ACCESS TO THIS SOFTWARE MAY BE REVOKED AT ANY TIME |
|
||||
| 3A. IF YOUR ACCESS IS REVOKED, YOU MAY CONTINUE TO USE |
|
||||
| AND KEEP YOUR CURRENT COPY OF THIS SOFTWARE AND THIS |
|
||||
| LICENSE MAY BE REPLACED WITH AN UPDATED VERSION FOR YOU |
|
||||
| TO USE |
|
||||
| |
|
||||
| Under the terms of this license, you agree that you may: |
|
||||
| - view source code and files contained in this package |
|
||||
| upon request |
|
||||
| - make copies of this code, in whole or in part, for |
|
||||
| personal use |
|
||||
| - share copies of this license and/or code, provided this |
|
||||
| work is never publicly available |
|
||||
| - test this code on your personal systems |
|
||||
| |
|
||||
| Under the terms of this license, you agree that may not: |
|
||||
| - use this code for commercial purposes |
|
||||
| - modify this code or license |
|
||||
| |
|
||||
| ANY RIGHTS NOT EXPLICITLY GRANTED TO YOU IN THIS LICENSE ARE |
|
||||
| AUTOMATICALLY UNDER CONTROL OF ISAAC GREENE. |
|
||||
| ALL PROVISIONS IN THIS LICENSE MAY BE MODIFIED ON A PER-CASE |
|
||||
| BASIS ON REQUEST, SUBJECT TO APPROVAL. |
|
||||
| Permission to distribute, modify, publish, monetize, or otherwise|
|
||||
| go against the preset terms of this license may be granted, in |
|
||||
| writing and by request, by Isaac Greene. |
|
||||
| |
|
||||
| ANY AND ALL REDISTRIBUTIONS OF THIS WORK(S) MUST INLCLUDE A COPY |
|
||||
| OF THIS LICENSE IN THE ABOVE FORM AND THE FOLLOWING DISCLAIMER |
|
||||
| IN THE DOCUMENTATION AND/OR OTHER MATERIALS PROVIDED. |
|
||||
| |
|
||||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
|
||||
| CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES |
|
||||
| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
||||
| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
||||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
|
||||
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
||||
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
||||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
||||
| USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
|
||||
| AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
||||
| LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|
||||
| IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
|
||||
| THE POSSIBILITY OF SUCH DAMAGE. |
|
||||
--------------------------------------------------------------------
|
||||
""")
|
||||
// this part's kind of self explanatory.
|
||||
// this is the Software License for all of the
|
||||
// code in this application.
|
||||
.font(.custom("Menlo", size: fontSize))
|
||||
.textSelection(.enabled)
|
||||
.multilineTextAlignment(.leading)
|
||||
// these modifiers simply change the default font
|
||||
// font size, and allows you to select this text
|
||||
Text("\nCreated: 2022-06-08")
|
||||
Text("Updated: 2022-06-09")
|
||||
}
|
||||
.navigationTitle("Software License Agreement")
|
||||
// sets the top of the screen to this text which always
|
||||
// lets you know what page you're in
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LicenseProvider_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LicenseView()
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,6 @@ struct algorithmView: View {
|
|||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text("Calculating pace is fairly straightforward, and does not change with increased complexity. The standard formula is simply this:\n")
|
||||
mathView()
|
||||
.frame(maxHeight: 300)
|
||||
Text("\nWhere:\n")
|
||||
HStack {
|
||||
Text("\"t\"")
|
||||
|
|
@ -70,6 +69,7 @@ struct mathView: View {
|
|||
var body: some View {
|
||||
mathLaTeX_inator(mathString: $mathString)
|
||||
.padding(30)
|
||||
.frame(maxHeight: 300)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CachedManifest</key>
|
||||
<dict>
|
||||
<key>manifestData</key>
|
||||
<data>
|
||||
eyJkZXBlbmRlbmNpZXMiOltdLCJkaXNwbGF5TmFtZSI6IlNwbGl0cyAoeGNv
|
||||
ZGUpIiwicGFja2FnZUtpbmQiOnsicm9vdCI6e319LCJwbGF0Zm9ybXMiOlt7
|
||||
Im9wdGlvbnMiOltdLCJwbGF0Zm9ybU5hbWUiOiJpb3MiLCJ2ZXJzaW9uIjoi
|
||||
MTUuMiJ9XSwicHJvZHVjdHMiOlt7Im5hbWUiOiJTcGxpdHMgKHhjb2RlKSIs
|
||||
InNldHRpbmdzIjpbeyJkaXNwbGF5VmVyc2lvbiI6WyIxLjAiXX0seyJidW5k
|
||||
bGVWZXJzaW9uIjpbIjEiXX0seyJpT1NBcHBJbmZvIjpbeyJhY2NlbnRDb2xv
|
||||
ciI6eyJwcmVzZXRDb2xvciI6eyJwcmVzZXRDb2xvciI6eyJyYXdWYWx1ZSI6
|
||||
ImJsdWUifX19LCJhcHBDYXRlZ29yeSI6eyJyYXdWYWx1ZSI6InB1YmxpYy5h
|
||||
cHAtY2F0ZWdvcnkucmVmZXJlbmNlIn0sImFwcEljb24iOnsiYXNzZXQiOnsi
|
||||
bmFtZSI6IkFwcEljb24ifX0sImNhcGFiaWxpdGllcyI6W10sInN1cHBvcnRl
|
||||
ZERldmljZUZhbWlsaWVzIjpbInBhZCIsInBob25lIl0sInN1cHBvcnRlZElu
|
||||
dGVyZmFjZU9yaWVudGF0aW9ucyI6W3sicG9ydHJhaXQiOnt9fSx7ImxhbmRz
|
||||
Y2FwZVJpZ2h0Ijp7fX0seyJsYW5kc2NhcGVMZWZ0Ijp7fX0seyJwb3J0cmFp
|
||||
dFVwc2lkZURvd24iOnsiY29uZGl0aW9uIjp7ImRldmljZUZhbWlsaWVzIjpb
|
||||
InBhZCJdfX19XX1dfV0sInRhcmdldHMiOlsiQXBwTW9kdWxlIl0sInR5cGUi
|
||||
OnsiZXhlY3V0YWJsZSI6bnVsbH19XSwidGFyZ2V0TWFwIjp7IkFwcE1vZHVs
|
||||
ZSI6eyJkZXBlbmRlbmNpZXMiOltdLCJleGNsdWRlIjpbXSwibmFtZSI6IkFw
|
||||
cE1vZHVsZSIsInBhdGgiOiIuIiwicmVzb3VyY2VzIjpbeyJwYXRoIjoiUmVz
|
||||
b3VyY2VzIiwicnVsZSI6InByb2Nlc3MifV0sInNldHRpbmdzIjpbXSwidHlw
|
||||
ZSI6ImV4ZWN1dGFibGUifX0sInRhcmdldHMiOlt7ImRlcGVuZGVuY2llcyI6
|
||||
W10sImV4Y2x1ZGUiOltdLCJuYW1lIjoiQXBwTW9kdWxlIiwicGF0aCI6Ii4i
|
||||
LCJyZXNvdXJjZXMiOlt7InBhdGgiOiJSZXNvdXJjZXMiLCJydWxlIjoicHJv
|
||||
Y2VzcyJ9XSwic2V0dGluZ3MiOltdLCJ0eXBlIjoiZXhlY3V0YWJsZSJ9XSwi
|
||||
dG9vbHNWZXJzaW9uIjp7Il92ZXJzaW9uIjoiNS42LjAifX0=
|
||||
</data>
|
||||
<key>manifestHash</key>
|
||||
<data>
|
||||
WgKmeoWf+Bj+Qu+O7UzxUM8NfKQ05KkxTrSCpMujqwc=
|
||||
</data>
|
||||
<key>schemaVersion</key>
|
||||
<integer>4</integer>
|
||||
<key>swiftPMVersionString</key>
|
||||
<string>5.6.0-dev</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "CachedManifest.plist",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "DocumentThumbnail.plist",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>DocumentThumbnailConfiguration</key>
|
||||
<dict>
|
||||
<key>accentColorHash</key>
|
||||
<data>
|
||||
Fkd2iMDgBpnGz6RJejYS1+g8UyBitkslD+2JCBKO1Ug=
|
||||
</data>
|
||||
<key>appIconHash</key>
|
||||
<data>
|
||||
/IWi/U3c/c470W/iOzj/qVpABAg9zSo+v3Y0wtHy9TY=
|
||||
</data>
|
||||
<key>thumbnailIsPrerendered</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "DocumentThumbnail.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 487 KiB |
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "Workspace.plist",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AppSettings</key>
|
||||
<dict>
|
||||
<key>appIconPlaceholderGlyphName</key>
|
||||
<string>cloud</string>
|
||||
<key>appSettingsVersion</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "contents.xcworkspacedata",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "UserInterfaceState.xcuserstate",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "xcschememanagement.plist",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Splits (xcode).xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
//
|
||||
// ChangeLogData.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// it is considered self-explanatory and best viewed in-app
|
||||
|
||||
struct June2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-06-09
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-09")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease LVSXT10c.2\n")
|
||||
.font(.footnote)
|
||||
Text("u{2022} Worked on a simple login page to view contact info\n\t\u{2022} Spent *way* too long on it")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-08
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-08")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10c\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Finished with a conversion of the pace to be a more readable format (i.e. 5:45 instead of 5.75)!\n\t\u{2022} This is probably one of the biggest things to increase readability in the app\n\u{2022} Installed a Software License")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-05
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-05")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10d.3\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Started work on converting the pace to a more understandable format")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-04
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-04")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10d.2\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Reformatted some tabs, and added the Recently Resolved issues tab\n\u{2022} Moved the Help tab into Docs")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-03
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-03")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10d\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Finished hours input.\n\u{2022} Moved some things around and the \"Change log\" tab is now \"Docs\" which holds info on features, the change log, and known issues, with a few other things.")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-06-01
|
||||
//gay
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-06-01")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10g.3\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Partially implemented an easier way to input hours. Mostly working on formatting issues, but it shows up somewhat like it's supposed to.")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("June 2022 Log")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
|
||||
struct May2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-05-25
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-05-25")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10g.2\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} I'm at a stalemate with Swift")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//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)
|
||||
}
|
||||
.navigationTitle("May 2022 Log")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
|
||||
struct April2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-04-13
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-13")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10j\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Started work on optimizing code. Made no other changes and left the code with errors.")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-11
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-11")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10k\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Fixed total time display so now 300 seconds properly wraps to 5 minutes and minutes now also wrap when seconds equates to an amount that equals more than 60 minutes\n\u{2022} Forced all text in change log to left side of screen")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-10
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-10")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10m\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Added known issues view\n\t\u{2022} Might add this to the change log navigation at the bottom in the future\n\u{2022} Reverted to a different commit in Git so that the app can be used")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-09
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-09")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10n\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Fixed the math with seconds so now you can actually use them! YEAH BABY!\n\u{2022} Rounded pace so that you don't get values like 4.999999999999996 minutes per km\n\t\u{2022} Working on getting the seconds to change into minutes like 340 seconds will show as 5 minutes 40 seconds or \"0:05:40\"\n\u{2022} Removed warning about not using seconds (because they work now!)\n\u{2022} Got math color right. Issue was I had my colors switched so it showed black text in dark mode, and white text in light mode.\n\u{2022} Fixed distance between time boxes\n\u{2022} Removed text about not using seconds greater than 59 in text field\n\u{2022} Properly implemented tab view so that each view gets ONE (1) tab\n\u{2022} Added Git which I should've done long ago\n\u{2022} Tweaked various visual elements. For some reason, SF Symbols doesn't have a calculator??? So instead I'm using \"candybarphone\" but \"building\" looked good, too\n\u{2022} Got overflow of minutes working so now 100 minutes will show as 1 hour 40 minutes.\n\t\u{2022} Seconds overflow does not work (see known issues)")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-08
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-08")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10r\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Added bullet points to change log\n\u{2022} Changed text in \"Help\" section about using seconds (ended up not working)\n\u{2022} Tried unsuccessfully to dynamically change the color of the pace formula whether in dark or light mode\n\u{2022} Temporarily removed change log in Build t\n\u{2022} Fixed positioning of minutes and seconds text boxes\n\u{2022} Total time now shows correct minute/hour time (minutes and hours are no longer equal)\n\t\u{2022} Seconds still don't work properly")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-05
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-05")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10u.2\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Reformatted change log to include better navigation and clearer notice of changes")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-04-03
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-04-03")
|
||||
.font(.title2)
|
||||
Text("Version Prerelease Build LVSXT10u\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Moved app production over from Swift Playgrounds on iPad to Xcode on Mac\n\u{2022} Fixed math\n\u{2022} Implemented change log view\n\u{2022} Restructured code so it gave fewer errors\n\u{2022} Added correct pace data\n\t\u{2022} At this time, the seconds functionality is entirely broken\n\u{2022} Implemented total time view\n\t\u{2022} For some reason, the view for the minutes automatically fills in for the hours as well")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("April 2022 Log")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
|
||||
struct March2022: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
//2022-03-26
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-03-26:2022-03-31")
|
||||
.font(.title2)
|
||||
Text("Version [UNNAMED]\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} Things were made, fixed, broken, removed, etc. I don't know what happened because I had no system in place to track changes")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
|
||||
//2022-03-25
|
||||
HStack {
|
||||
VStack (alignment: .leading) {
|
||||
Text("2022-03-25")
|
||||
.font(.title2)
|
||||
Text("Version [UNNAMED]\n")
|
||||
.font(.footnote)
|
||||
Text("\u{2022} App production started. Textfields were mostly implemented but didn't do anything. Also started on the help page.")
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("March 2022 Log")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "ChangeLogData.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
//
|
||||
// ChangeLogView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
struct ChangeLog: View {
|
||||
var body: some View {
|
||||
List {
|
||||
Section(header: Text("2022")) {
|
||||
NavigationLink("June", destination: June2022())
|
||||
NavigationLink("May", destination: May2022())
|
||||
NavigationLink("April", destination: April2022())
|
||||
NavigationLink("March", destination: March2022())
|
||||
}
|
||||
}
|
||||
.listStyle(.insetGrouped)
|
||||
.navigationTitle("Change Log")
|
||||
}
|
||||
}
|
||||
struct ChangeLog_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ChangeLog()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "ChangeLogView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,184 @@
|
|||
//
|
||||
// ContentView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Foundation
|
||||
|
||||
struct ContentView: View {
|
||||
var SISystem = ["km","mi"]
|
||||
@State var timeHours: String = ""
|
||||
@State var timeMinutes: String = ""
|
||||
@State var timeSeconds: String = ""
|
||||
@State var selectedSystem: String = "km"
|
||||
@State var distance: String = ""
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
VStack {
|
||||
TextField("Enter distance here", text: $distance)
|
||||
.padding()
|
||||
.keyboardType(.decimalPad)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
VStack {
|
||||
Text("Unit of measurement:")
|
||||
Picker("System of measurement", selection: $selectedSystem, content: {
|
||||
ForEach(SISystem, id: \.self, content: { unit in
|
||||
Text(unit)
|
||||
})
|
||||
})
|
||||
.pickerStyle(.segmented)
|
||||
.frame(minWidth: 60, maxWidth: 300)
|
||||
HStack {
|
||||
VStack {
|
||||
Text("Hours")
|
||||
TextField("Enter hours here", text: $timeHours)
|
||||
.keyboardType(.numberPad)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
.frame(minWidth: 100)
|
||||
.padding(.trailing, -15)
|
||||
.padding()
|
||||
VStack {
|
||||
Text("Minutes")
|
||||
TextField("Enter minutes here", text: $timeMinutes)
|
||||
.keyboardType(.numberPad)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
.frame(minWidth: 100)
|
||||
.padding(.trailing, -15)
|
||||
.padding(.leading, -15)
|
||||
.padding()
|
||||
VStack {
|
||||
Text("Seconds")
|
||||
TextField("Enter seconds here", text: $timeSeconds)
|
||||
.keyboardType(.asciiCapableNumberPad)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
}
|
||||
.frame(minWidth: 100)
|
||||
.padding(.leading, -15)
|
||||
.padding()
|
||||
}
|
||||
PaceResults(timeHours: $timeHours, timeMinutes: $timeMinutes, timeSeconds: $timeSeconds, selectedSystem: $selectedSystem, distance: $distance)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PaceResults: View {
|
||||
@Binding var timeHours: String
|
||||
@Binding var timeMinutes: String
|
||||
@Binding var timeSeconds: String
|
||||
@Binding var selectedSystem: String
|
||||
@Binding var distance: String
|
||||
|
||||
var body: some View {
|
||||
let distanceDub = Double(distance) ?? 1.0
|
||||
// because of some conversions I have to do,
|
||||
// this constant is a double just to make things easier.
|
||||
// this has to be one because the pace is calculated
|
||||
// by time / distance, and you can't divide by 0.
|
||||
// I could just make the TextField have a default value
|
||||
// but then my message would disappear to let you know
|
||||
// what to enter in that box
|
||||
|
||||
let multiplier = {selectedSystem == "mi" ? 1.609344 : 0.6213711922}()
|
||||
let notSelectedSystem = {selectedSystem == "km" ? "mi" : "km"}()
|
||||
let convertedDistance = distanceDub * multiplier
|
||||
let convertedDistanceString = {distance == "" ? "" : String(format: "%.2f", convertedDistance)}()
|
||||
|
||||
let convertedSeconds:Double = (Double(timeSeconds) ?? 0) * (1.6666666666666666666666666)
|
||||
let timeSecondsInt:Int = Int(timeSeconds) ?? 0
|
||||
let timeSecondsUnderSixty:Int = (timeSecondsInt % 60)
|
||||
// this section takes the seconds and multiplies it by 1.66
|
||||
// so that 60 seconds becomes 100 (as in 100% of a minute)
|
||||
// and this means that 30 seconds becomes 50 (as in 50% of a minute)
|
||||
// which allows us to to calculate our pace. Without this
|
||||
// the pace would be all wrong.
|
||||
|
||||
let timeSecondsToMinutes:Int = (timeSecondsInt - timeSecondsUnderSixty) / 60
|
||||
// this takes the seconde and converts it to minutes so 78
|
||||
// seconds will turn into 1 minute and 18 seconds leftover
|
||||
// with the minutes saved in this value and the seconds
|
||||
// disregarded because they're saved in timeSecondsUnderSixty
|
||||
|
||||
let timeMinutesInt:Int = (Int(timeMinutes) ?? 0) + (timeSecondsToMinutes)
|
||||
let timeMinutesUnderSixty:Int = timeMinutesInt % 60
|
||||
let timeMinutesToHours:Int = (timeMinutesInt - timeMinutesUnderSixty) / 60
|
||||
// this section tales the minutes (which it combines the
|
||||
// minutes with the timeSecondsToMinutes) then finds out how
|
||||
// many hours (multiples of 60) are in the minutes value
|
||||
// and saves the hours in timeMinutesToHours and the remaining
|
||||
// minutes in timeMinutesUnderSixty
|
||||
|
||||
let timeMinutesDouble:Double = Double(timeMinutes) ?? 0.0
|
||||
// this line of code takes the binding $timeMinutes which
|
||||
// is a string and turns it into a number of type Double.
|
||||
// while the TextField is a number pad, on iPads, Mac computers
|
||||
// and using copy/paste you can get other characters.
|
||||
// if the text field contains anything other than a number
|
||||
// or a single decimal, this value instantly becomes 0.0
|
||||
|
||||
let actualTime:Double = timeMinutesDouble + (convertedSeconds / 100) + ((Double(timeHours) ?? 0) * 60)
|
||||
// adds the minutes, hours, and seconds all together to get
|
||||
// a single value in terms of minutes, so that 1:08:45
|
||||
// becomes 68.75 which is a nice number we can do math on
|
||||
// and this number is never directly seen by the user
|
||||
let pace = actualTime / distanceDub
|
||||
let paceOpposite = (selectedSystem == "km" ? (pace * 1.609344) : (pace * 0.6213711922))
|
||||
|
||||
let paceSeconds = pace.truncatingRemainder(dividingBy: 1.0)
|
||||
let paceMinutes = (pace.truncatingRemainder(dividingBy: 60.0) - paceSeconds)
|
||||
let paceHours = String(format: "%.0f", ((pace - paceMinutes) / 60))
|
||||
let reConvertedSeconds = (paceSeconds / 1.666666666666666666) * 100
|
||||
|
||||
let properTimeMS = String(format: "%02d:%02d", Int(paceMinutes), Int(reConvertedSeconds.rounded()))
|
||||
|
||||
let paceSecondsOpposite = paceOpposite.truncatingRemainder(dividingBy: 1.0)
|
||||
let paceMinutesOpposite = (paceOpposite.truncatingRemainder(dividingBy: 60.0) - paceSecondsOpposite)
|
||||
let paceHoursOpposite = String(format: "%.0f", ((paceOpposite - paceMinutesOpposite) / 60))
|
||||
let reConvertedSecondsOpposite = (paceSecondsOpposite / 1.666666666666666666) * 100
|
||||
|
||||
let properTimeMSOpposite = String(format: "%02d:%02d", Int(paceMinutesOpposite), Int(reConvertedSecondsOpposite.rounded()))
|
||||
|
||||
//let paceString:String = String(format: "%.2f", pace)
|
||||
let totalHours:Double = Double(timeMinutesToHours) + (Double(timeHours) ?? 0)
|
||||
// this takes the number of hours in the binding $timeHours
|
||||
// and the hours calculated in the previous section
|
||||
// and adds them together to get our total number of hours.
|
||||
let hoursFormatted:String = String(format: "%.0f", totalHours)
|
||||
let paceFormatted:String = {pace >= 60 ? "\(paceHours):\(properTimeMS)" : "\(properTimeMS)"}()
|
||||
|
||||
let paceFormattedOpposite:String = {paceOpposite >= 60 ? "\(paceHoursOpposite):\(properTimeMSOpposite)" : "\(properTimeMSOpposite)"}()
|
||||
|
||||
let leadingZeros:String = String(format: "%02d:%02d", timeMinutesUnderSixty, timeSecondsUnderSixty)
|
||||
// this takes the minutes and the seconds and adds leading
|
||||
// zeros to them, so that 5 minutes 7 seconds will show
|
||||
// as 05:07 which is a format most people, and certainly
|
||||
// the people this app is intended for, will understand
|
||||
|
||||
HStack {
|
||||
VStack {
|
||||
|
||||
Text("Distance: \(distance)\(selectedSystem)")
|
||||
Text("Converted distance: \(convertedDistanceString)\(notSelectedSystem)")
|
||||
}
|
||||
Text("Total time: \(hoursFormatted):\(leadingZeros)")
|
||||
.padding()
|
||||
VStack {
|
||||
Text("\(paceFormatted) per \(selectedSystem)")
|
||||
Text("\(paceFormattedOpposite) per \(notSelectedSystem)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "ContentView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "DocsView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
//
|
||||
// DocsView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
let username = "admin"
|
||||
let password = "123"
|
||||
|
||||
struct DocsView: View {
|
||||
@State var pass: String = ""
|
||||
@State var user: String = ""
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List {
|
||||
NavigationLink("Help", destination: HelpView())
|
||||
NavigationLink("Change Log", destination: ChangeLog())
|
||||
|
||||
Section(header: Text("Features")) {
|
||||
NavigationLink("New", destination: NewFeatures())
|
||||
NavigationLink("In Progress", destination: InProgressFeatures())
|
||||
NavigationLink("Deprecated", destination: DeprecatedFeatures())
|
||||
}
|
||||
Section(header: Text("Known Issues")) {
|
||||
NavigationLink("Recently Resolved", destination: RecentlyResolved())
|
||||
NavigationLink("High Priority", destination: HighPriority())
|
||||
NavigationLink("Medium Priority", destination: MediumPriority())
|
||||
NavigationLink("Low Priority", destination: LowPriority())
|
||||
}
|
||||
Section(header: Text("App Information")) {
|
||||
NavigationLink("Software License", destination: LicenseView())
|
||||
Text("Version: Prerelease LVSXT10c.2")
|
||||
Text("Release date: 2022-06-09")
|
||||
Text("Start date: 2022-03-25")
|
||||
Link("Built with SwiftUI \(Image(systemName: "swift"))", destination: URL(string: "https://developer.apple.com/xcode/swiftui")!)
|
||||
}
|
||||
Section(header: Text("Login")) {
|
||||
SecureField("Username", text: $user)
|
||||
SecureField("Password", text: $pass)
|
||||
if (pass == password && user == username) {
|
||||
NavigationLink("Contacts", destination: SecretView())
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle("Docs")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct DocsView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
DocsView()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "FeaturesView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
//
|
||||
// FeaturesView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// it is considered self-explanatory and best viewed in-app
|
||||
|
||||
struct NewFeatures: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("\u{2022} Added the most barebones login page possible")
|
||||
Text("Implemented in Version Prerelease LVSXT10c.2\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
Text("\u{2022} Reformatted the Docs tabs and made the common things up at the top")
|
||||
Text("Implemented in Version Prerelease LVSXT10d.2\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
Text("\u{2022} Added the Features, Known Issues, and moved the Change Log for better navigation")
|
||||
Text("Implemented in Version Prerelease LVSXT10d\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
Text("\u{2022} Total time now shows the time in a way we humans can understand")
|
||||
Text("Implemented in Version Prerelease LVSXT10k\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.navigationTitle("New Features")
|
||||
}
|
||||
}
|
||||
|
||||
struct InProgressFeatures: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Note: this does not include things I have to fix\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
.padding(-30)
|
||||
Text("\u{2022} Working on a conversion between measurements for pace and distance\n")
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.navigationTitle("In Progress")
|
||||
}
|
||||
}
|
||||
|
||||
struct DeprecatedFeatures: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("\n\u{2022} Removed the picker wheel to enter total time (a truly horrible system)")
|
||||
Text("Stricken before recorded history\n")
|
||||
.font(.footnote)
|
||||
.italic()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.navigationTitle("Deprecated")
|
||||
}
|
||||
}
|
||||
|
||||
struct FeaturesView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NewFeatures()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "KnownIssues.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
//
|
||||
// KnownIssues.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// it is considered self-explanatory and best viewed in-app
|
||||
|
||||
struct RecentlyResolved: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("\n\u{2022} None since the addition of this tab")
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("Recently Resolved")
|
||||
}
|
||||
}
|
||||
|
||||
struct HighPriority: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("\n\u{2022} You can not dismiss the keyboard on iPhone\n\t\u{2022} This hides the tab bar at the bottom so you can't navigate the app after bringing it up")
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("High Priority")
|
||||
}
|
||||
}
|
||||
|
||||
struct MediumPriority: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Wow. Such Empty.")
|
||||
.italic()
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("Medium Priority")
|
||||
}
|
||||
}
|
||||
|
||||
struct LowPriority: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(alignment: .leading) {
|
||||
Text("\n\u{2022} Space between the equation and explanation in the \"Help\" tab is too large\n\u{2022} App has no custom icon")
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.navigationTitle("Low Priority")
|
||||
}
|
||||
}
|
||||
|
||||
struct KnownIssues_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
HighPriority()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "LicenseView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
//
|
||||
// LicenseView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/9/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LicenseView: View {
|
||||
var fontSize:CGFloat {UIScreen.main.bounds.width > 700 ? 18 : 8}
|
||||
// figuring out how to do this came partly from tinyurl.com/9snwkrzt
|
||||
// and also partly from stackoverflow.com/questions/57727107/
|
||||
// then I remembered about ternary operators and I optimized it
|
||||
// This allows the license to be properly formatted
|
||||
// on any screen size by getting the resolution then
|
||||
// setting fontSize to a value based on that where the whole
|
||||
// line can be viewed without scrolling horizontally
|
||||
// or with wrapped text, ruining the required formatting I have.
|
||||
// As of 2022-06-08, I have not tested this on a phone.
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
--------------------------------------------------------------------
|
||||
| THIS WORK, AND ALL SUBSEQUENT RELEASES, VERSIONS, MODIFICATIONS, |
|
||||
| AND UPDATES ARE COPYRIGHT © ISAAC GREENE, AND MAY BE RELEASED |
|
||||
| UNDER THIS LICENSE. |
|
||||
| |
|
||||
| COPIES OF THIS SOURCE CODE MAY BE MADE AVAILABLE BY WRITTEN |
|
||||
| REQUEST TO ISAAC GREENE. ISAAC GREENE IS GIVEN FULL DISCRETION |
|
||||
| TO APPROVE OR DENY THESE REQUESTS. |
|
||||
| CHANGES MAY BE MADE TO THIS LICENSE AT ANY TIME WITHOUT |
|
||||
| NOTICE OR WARNING. |
|
||||
| |
|
||||
| BY ANY USE OF THIS SOFTWARE AND/OR LICENSE YOU AGREE THAT: |
|
||||
| 1. YOU ARE SUBJECT TO THE TERMS PUT FORTH IN THIS LICENSE. |
|
||||
| 2. YOU HAVE NO GUARANTEED RIGHTS REGARDING THE USE OF THIS |
|
||||
| APPLICATION OR LICENSE. |
|
||||
| 3. YOUR ACCESS TO THIS SOFTWARE MAY BE REVOKED AT ANY TIME |
|
||||
| 3A. IF YOUR ACCESS IS REVOKED, YOU MAY CONTINUE TO USE |
|
||||
| AND KEEP YOUR CURRENT COPY OF THIS SOFTWARE AND THIS |
|
||||
| LICENSE MAY BE REPLACED WITH AN UPDATED VERSION FOR YOU |
|
||||
| TO USE |
|
||||
| |
|
||||
| Under the terms of this license, you agree that you may: |
|
||||
| - view source code and files contained in this package |
|
||||
| upon request |
|
||||
| - make copies of this code, in whole or in part, for |
|
||||
| personal use |
|
||||
| - share copies of this license and/or code, provided this |
|
||||
| work is never publicly available |
|
||||
| - test this code on your personal systems |
|
||||
| |
|
||||
| Under the terms of this license, you agree that may not: |
|
||||
| - use this code for commercial purposes |
|
||||
| - modify this code or license |
|
||||
| |
|
||||
| ANY RIGHTS NOT EXPLICITLY GRANTED TO YOU IN THIS LICENSE ARE |
|
||||
| AUTOMATICALLY UNDER CONTROL OF ISAAC GREENE. |
|
||||
| ALL PROVISIONS IN THIS LICENSE MAY BE MODIFIED ON A PER-CASE |
|
||||
| BASIS ON REQUEST, SUBJECT TO APPROVAL. |
|
||||
| Permission to distribute, modify, publish, monetize, or otherwise|
|
||||
| go against the preset terms of this license may be granted, in |
|
||||
| writing and by request, by Isaac Greene. |
|
||||
| |
|
||||
| ANY AND ALL REDISTRIBUTIONS OF THIS WORK(S) MUST INLCLUDE A COPY |
|
||||
| OF THIS LICENSE IN THE ABOVE FORM AND THE FOLLOWING DISCLAIMER |
|
||||
| IN THE DOCUMENTATION AND/OR OTHER MATERIALS PROVIDED. |
|
||||
| |
|
||||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
|
||||
| CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES |
|
||||
| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
||||
| MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
||||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
|
||||
| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
||||
| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
||||
| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
||||
| USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
|
||||
| AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
|
||||
| LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|
||||
| IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
|
||||
| THE POSSIBILITY OF SUCH DAMAGE. |
|
||||
--------------------------------------------------------------------
|
||||
""")
|
||||
// this part's kind of self explanatory.
|
||||
// this is the Software License for all of the
|
||||
// code in this application.
|
||||
.font(.custom("Menlo", size: fontSize))
|
||||
.textSelection(.enabled)
|
||||
.multilineTextAlignment(.leading)
|
||||
// these modifiers simply change the default font
|
||||
// font size, and allows you to select this text
|
||||
Text("\nCreated: 2022-06-08")
|
||||
Text("Updated: 2022-06-09")
|
||||
}
|
||||
.navigationTitle("Software License Agreement")
|
||||
// sets the top of the screen to this text which always
|
||||
// lets you know what page you're in
|
||||
.padding()
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct LicenseProvider_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
LicenseView()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "ModalView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
//
|
||||
// ModalView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
//import RichTextView
|
||||
|
||||
struct HelpView: View {
|
||||
@State var mathSheet = false
|
||||
@State var problemSheet = false
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Help")
|
||||
.font(.largeTitle)
|
||||
.bold()
|
||||
.padding(.top, 40)
|
||||
|
||||
Text("Due to limitations in the system, you can only use kilometers and miles at this time. \nSmaller units like meters and feet are not supported. \nYou can, however, use decimals, such as .2km or .8mi.\n\nI apologize for any inconvenience. In the future, I hope to make our app easier to use.\n\nI'm currently looking to add help articles about running to this page and it'll have loads of stuff about running and pace and all that stuff to actually help you with running. If I do, the purpose of this app might change.")
|
||||
.padding()
|
||||
|
||||
Button("See our math", action: {
|
||||
self.mathSheet.toggle()
|
||||
})
|
||||
.padding(30)
|
||||
.sheet(isPresented: self.$mathSheet, content: {
|
||||
algorithmView()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct algorithmView: View {
|
||||
var body: some View {
|
||||
Text("The Algorithm")
|
||||
.font(.largeTitle)
|
||||
.bold()
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text("Calculating pace is fairly straightforward, and does not change with increased complexity. The standard formula is simply this:\n")
|
||||
//mathView()
|
||||
Text("t/d = p")
|
||||
.font(.custom("Charter", size: 30))
|
||||
Text("\nWhere:\n")
|
||||
HStack {
|
||||
Text("\"t\"")
|
||||
.font(.custom("Charter", size: 18))
|
||||
Text("is total time")
|
||||
}
|
||||
HStack{
|
||||
Text("\"d\"")
|
||||
.font(.custom("Charter", size: 18))
|
||||
Text("is distance")
|
||||
}
|
||||
HStack {
|
||||
Text("\"p\"")
|
||||
.font(.custom("Charter", size: 18))
|
||||
Text("is the resulting pace")
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
struct mathView: View {
|
||||
@State var mathString:String = "[math] \\frac{t}{d} &= p [/math]"
|
||||
|
||||
var body: some View {
|
||||
mathLaTeX_inator(mathString: $mathString)
|
||||
.padding(30)
|
||||
.frame(maxHeight: 300)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct mathLaTeX_inator: UIViewRepresentable {
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@Binding var mathString:String
|
||||
|
||||
func makeUIView(context: Context) -> RichTextView {
|
||||
let richTextView = RichTextView(
|
||||
input: mathString,
|
||||
latexParser: LatexParser(),
|
||||
font: UIFont.systemFont(ofSize: UIFont.systemFontSize),
|
||||
textColor: (colorScheme == .dark ? UIColor.white : UIColor.black),
|
||||
frame: CGRect.zero,
|
||||
completion: nil
|
||||
)
|
||||
return richTextView
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: RichTextView, context: Context) {
|
||||
uiView.update(
|
||||
input: mathString,
|
||||
latexParser: LatexParser(),
|
||||
font: UIFont.systemFont(ofSize: UIFont.systemFontSize),
|
||||
textColor: (colorScheme == .dark ? UIColor.white : UIColor.black),
|
||||
completion: nil
|
||||
)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "Package.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
// swift-tools-version: 5.6
|
||||
|
||||
// WARNING:
|
||||
// This file is automatically generated.
|
||||
// Do not edit it by hand because the contents will be replaced.
|
||||
|
||||
import PackageDescription
|
||||
import AppleProductTypes
|
||||
|
||||
let package = Package(
|
||||
name: "Splits (xcode)",
|
||||
platforms: [
|
||||
.iOS("15.2")
|
||||
],
|
||||
products: [
|
||||
.iOSApplication(
|
||||
name: "Splits (xcode)",
|
||||
targets: ["AppModule"],
|
||||
displayVersion: "1.0",
|
||||
bundleVersion: "1",
|
||||
appIcon: .asset("AppIcon"),
|
||||
accentColor: .presetColor(.blue),
|
||||
supportedDeviceFamilies: [
|
||||
.pad,
|
||||
.phone
|
||||
],
|
||||
supportedInterfaceOrientations: [
|
||||
.portrait,
|
||||
.landscapeRight,
|
||||
.landscapeLeft,
|
||||
.portraitUpsideDown(.when(deviceFamilies: [.pad]))
|
||||
],
|
||||
appCategory: .reference
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
.executableTarget(
|
||||
name: "AppModule",
|
||||
path: ".",
|
||||
resources: [
|
||||
.process("Resources")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "SecretView.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
import SwiftUI
|
||||
|
||||
struct SecretView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
VStack {
|
||||
Image("jake.zimmerman.group")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Zim")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Jake Zimmerman
|
||||
Email: jzimmerman@lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 753-5620", destination: URL(string: "tel:2697535620")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
|
||||
VStack {
|
||||
Image("caleb.bost.duo")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Caleb")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Caleb Bost
|
||||
Email: bostc@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 578-6148", destination: URL(string: "tel:2695786148")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
}
|
||||
HStack {
|
||||
VStack {
|
||||
Image("aiden.moore.states")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Aiden")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Aiden Moore
|
||||
Email: moorea8@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 579-3882", destination: URL(string: "tel:2695793882")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
VStack {
|
||||
Image("isaac.greene.clouds")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Isaac")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Isaac Greene
|
||||
Email: greenei@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 282-2280", destination: URL(string: "tel:2692822280")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "SplitsApp.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// SplitsApp.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/3/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
@main
|
||||
struct SplitsApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
TabViewData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"data" : [
|
||||
{
|
||||
"filename" : "TabViewData.swift",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// TabViewData.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 4/9/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
struct TabViewData: View {
|
||||
var body: some View {
|
||||
TabView {
|
||||
ContentView()
|
||||
.tabItem {
|
||||
Label("Calculator", systemImage: "candybarphone")
|
||||
}
|
||||
DocsView()
|
||||
.tabItem {
|
||||
Label("Docs", systemImage: "doc.text.fill")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct TabViewData_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
TabViewData()
|
||||
}
|
||||
}
|
||||
109
Splits/SecretView.swift
Normal file
109
Splits/SecretView.swift
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
//
|
||||
// SecretView.swift
|
||||
// Splits
|
||||
//
|
||||
// Created by Isaac Greene on 6/9/22
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
struct SecretView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
VStack {
|
||||
Image("jake.zimmerman.group")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Zim")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Jake Zimmerman
|
||||
Email: jzimmerman@lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 753-5620", destination: URL(string: "tel:2697535620")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
|
||||
VStack {
|
||||
Image("caleb.bost.duo")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Caleb")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Caleb Bost
|
||||
Email: bostc@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 578-6148", destination: URL(string: "tel:2695786148")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
}
|
||||
HStack {
|
||||
VStack {
|
||||
Image("aiden.moore.states")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Aiden")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Aiden Moore
|
||||
Email: moorea8@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 579-3882", destination: URL(string: "tel:2695793882")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
VStack {
|
||||
Image("isaac.greene.clouds")
|
||||
.resizable()
|
||||
.interpolation(.high)
|
||||
.frame(width: 75, height: 75)
|
||||
.clipShape(Circle())
|
||||
Text("Isaac")
|
||||
.font(.title2)
|
||||
VStack (alignment: .leading) {
|
||||
Text("""
|
||||
Name: Isaac Greene
|
||||
Email: greenei@students.lakeviewspartans.org
|
||||
""")
|
||||
HStack {
|
||||
Text("Phone:")
|
||||
Link("(269) 282-2280", destination: URL(string: "tel:2692822280")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(minWidth: 350, minHeight: 175)
|
||||
.border(.primary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,11 @@
|
|||
//
|
||||
|
||||
import SwiftUI
|
||||
// this file will not have comments.
|
||||
// this code is considered simple enough to be
|
||||
// human-readable without aid, as long as
|
||||
// the reader has a basic understanding of
|
||||
// Swift and/or SwiftUI.
|
||||
|
||||
@main
|
||||
struct SplitsApp: App {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue