diff --git a/Images/Screenshots/iPhone 11 Pro Max 1.jpeg b/Images/Screenshots/iPhone 11 Pro Max 1.jpeg new file mode 100644 index 0000000..c156886 Binary files /dev/null and b/Images/Screenshots/iPhone 11 Pro Max 1.jpeg differ diff --git a/Images/Screenshots/iPhone 11 Pro Max 2 - Tracks.jpeg b/Images/Screenshots/iPhone 11 Pro Max 2 - Tracks.jpeg new file mode 100644 index 0000000..615efcf Binary files /dev/null and b/Images/Screenshots/iPhone 11 Pro Max 2 - Tracks.jpeg differ diff --git a/Images/Screenshots/iPhone 11 Pro Max 3 - Track.jpeg b/Images/Screenshots/iPhone 11 Pro Max 3 - Track.jpeg new file mode 100644 index 0000000..f3b1a01 Binary files /dev/null and b/Images/Screenshots/iPhone 11 Pro Max 3 - Track.jpeg differ diff --git a/README.md b/README.md index 9801b75..b0d773e 100644 --- a/README.md +++ b/README.md @@ -1 +1,38 @@ -# Tickmate-iOS \ No newline at end of file +# Tickmate + +1-bit journal + +### Screenshots + + + +## Description + +Tickmate allows you to track any daily occurrences. +It is a is a 1-bit journal, meaning each day is either ticked or not. +You can track anything from habits you wish to build or break to how often you wash your hair. + ++ Use a "reversed" track for occurrences you don't want to happen, so they're automatically ticked unless you untick them. ++ You can use the "allow multiple" feature to be able to tick a single day multiple times. ++ With iCloud sync, all your data will be securely synced across all devices. + +### Inspiration + +Tickmate for iOS was designed after [lordi/tickmate](https://github.com/lordi/tickmate) for Android. + +## Build + +Building Tickmate requires Xcode 12+ on macOS 10.15 or later for ++ iOS Swift Package Manager support ++ SwiftUI 2 + +Dependencies: + +* [malcommac/SwiftDate](https://github.com/malcommac/SwiftDate) +* [siteline/SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect) + +These dependencies should be automatically fetched by Xcode. + +## License + +This project is open-source and licensed under the [The 2-Clause BSD License](LICENSE). diff --git a/Tickmate/Tickmate.xcodeproj/project.pbxproj b/Tickmate/Tickmate.xcodeproj/project.pbxproj index 1ebc4db..d903d6d 100644 --- a/Tickmate/Tickmate.xcodeproj/project.pbxproj +++ b/Tickmate/Tickmate.xcodeproj/project.pbxproj @@ -427,7 +427,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Tickmate/Tickmate.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_ASSET_PATHS = "\"Tickmate/Preview Content\""; DEVELOPMENT_TEAM = A4525544Q4; ENABLE_PREVIEWS = YES; @@ -451,7 +451,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = Tickmate/Tickmate.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_ASSET_PATHS = "\"Tickmate/Preview Content\""; DEVELOPMENT_TEAM = A4525544Q4; ENABLE_PREVIEWS = YES; diff --git a/Tickmate/Tickmate/Controllers/Persistence.swift b/Tickmate/Tickmate/Controllers/Persistence.swift index 290cf81..cdac780 100644 --- a/Tickmate/Tickmate/Controllers/Persistence.swift +++ b/Tickmate/Tickmate/Controllers/Persistence.swift @@ -42,6 +42,54 @@ class PersistenceController { result.save() return result }() + + func loadDemo() -> PersistenceController { + let viewContext = container.viewContext + + let fetchRequest: NSFetchRequest = Track.fetchRequest() + fetchRequest.fetchLimit = 1 + guard (try? viewContext.fetch(fetchRequest))?.isEmpty ?? false else { return self } + print("Loading demo...") + + let startDateOffset = 14 + let dateString = TrackController.iso8601.string(from: Date() - startDateOffset.days) + + let demoTracks = [ + [true, true, true, false, true, true, true, true, true, true, false, true, false, true, true, true, true, false, false, false, false, true, true, false], + [false, true, true, true, true, true, true, true, true, true, true, false, true, false, true, true, true, false, true, true, true, true, true, false], + [true, true, true, false, true, false, false, true, false, true, false, true, false, true, false].map { !$0 }, // This one is reversed + [true, true, true, true, true, false, true, true, false, true, false, true, true, true, true, true, false, true, true, true, true, true, true, true] + ] + + for (i, ticks) in demoTracks.enumerated() { + let track = Track( + name: String(UUID().uuidString.dropLast(28)), + multiple: i > 0, + reversed: i == 2, + startDate: dateString, + index: Int16(i), + context: viewContext) + PresetTracks[i].save(to: track) + track.startDate = dateString + + for (j, tick) in ticks.enumerated() where tick { + Tick(track: track, dayOffset: Int16(startDateOffset - j), context: viewContext) + } + } + + let disabledTrack = Track( + name: String(UUID().uuidString.dropLast(28)), + multiple: false, + reversed: false, + startDate: dateString, + index: 4, + context: viewContext) + PresetTracks[5].save(to: disabledTrack) + disabledTrack.enabled = false + + save() + return self + } let container: NSPersistentCloudKitContainer diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json index 4e5ec82..c6bdd9d 100644 --- a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,21 +1,25 @@ { + "info" : { + "version" : 1, + "author" : "xcode" + }, "images" : [ { + "idiom" : "ipad", "scale" : "1x", "filename" : "icon-40.png", - "size" : "40x40", - "idiom" : "ipad" + "size" : "40x40" }, { "filename" : "icon-40@2x.png", - "size" : "40x40", "idiom" : "ipad", + "size" : "40x40", "scale" : "2x" }, { - "filename" : "icon-60@2x.png", - "size" : "60x60", "scale" : "2x", + "size" : "60x60", + "filename" : "icon-60@2x.png", "idiom" : "iphone" }, { @@ -25,134 +29,130 @@ "filename" : "icon-72.png" }, { - "filename" : "icon-72@2x.png", - "size" : "72x72", "scale" : "2x", - "idiom" : "ipad" + "filename" : "icon-72@2x.png", + "idiom" : "ipad", + "size" : "72x72" }, { - "size" : "76x76", "filename" : "icon-76.png", + "idiom" : "ipad", "scale" : "1x", - "idiom" : "ipad" + "size" : "76x76" }, { - "filename" : "icon-76@2x.png", "scale" : "2x", - "idiom" : "ipad", - "size" : "76x76" + "filename" : "icon-76@2x.png", + "size" : "76x76", + "idiom" : "ipad" }, { "scale" : "1x", - "idiom" : "ipad", "filename" : "icon-small-50.png", - "size" : "50x50" + "size" : "50x50", + "idiom" : "ipad" }, { + "idiom" : "ipad", "filename" : "icon-small-50@2x.png", - "size" : "50x50", "scale" : "2x", - "idiom" : "ipad" + "size" : "50x50" }, { - "filename" : "icon-small.png", + "idiom" : "iphone", "scale" : "1x", "size" : "29x29", - "idiom" : "iphone" + "filename" : "icon-small.png" }, { - "filename" : "icon-small@2x.png", "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "filename" : "icon-small@2x.png", + "scale" : "2x", + "size" : "29x29" }, { - "idiom" : "iphone", "size" : "57x57", - "scale" : "1x", - "filename" : "icon.png" + "filename" : "icon.png", + "idiom" : "iphone", + "scale" : "1x" }, { - "size" : "57x57", - "scale" : "2x", "filename" : "icon@2x.png", - "idiom" : "iphone" + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" }, { - "idiom" : "iphone", - "size" : "29x29", "filename" : "icon-small@3x.png", - "scale" : "3x" + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" }, { - "filename" : "icon-40@3x.png", - "idiom" : "iphone", "scale" : "3x", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", "size" : "40x40" }, { - "idiom" : "iphone", "filename" : "icon-60@3x.png", + "scale" : "3x", "size" : "60x60", - "scale" : "3x" + "idiom" : "iphone" }, { - "size" : "40x40", "idiom" : "iphone", "filename" : "icon-40@2x.png", + "size" : "40x40", "scale" : "2x" }, { - "size" : "29x29", + "idiom" : "ipad", "filename" : "icon-small.png", - "scale" : "1x", - "idiom" : "ipad" - }, - { "size" : "29x29", - "scale" : "2x", - "idiom" : "ipad", - "filename" : "icon-small@2x.png" + "scale" : "1x" }, { "idiom" : "ipad", - "filename" : "icon-83.5@2x.png", - "size" : "83.5x83.5", + "size" : "29x29", + "filename" : "icon-small@2x.png", "scale" : "2x" }, { + "size" : "83.5x83.5", + "idiom" : "ipad", "scale" : "2x", + "filename" : "icon-83.5@2x.png" + }, + { "filename" : "notification-icon@2x.png", "idiom" : "iphone", - "size" : "20x20" + "size" : "20x20", + "scale" : "2x" }, { - "idiom" : "iphone", "size" : "20x20", + "idiom" : "iphone", "scale" : "3x", "filename" : "notification-icon@3x.png" }, { "filename" : "notification-icon~ipad.png", "size" : "20x20", - "idiom" : "ipad", - "scale" : "1x" + "scale" : "1x", + "idiom" : "ipad" }, { - "scale" : "2x", + "filename" : "notification-icon~ipad@2x.png", "size" : "20x20", "idiom" : "ipad", - "filename" : "notification-icon~ipad@2x.png" + "scale" : "2x" }, { - "filename" : "ios-marketing.png", - "size" : "1024x1024", "idiom" : "ios-marketing", - "scale" : "1x" + "filename" : "ios-marketing.png", + "scale" : "1x", + "size" : "1024x1024" } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } + ] } \ No newline at end of file diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png index f2f6755..3283643 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png index 7f90645..ab21d20 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png index 97c2269..ef37a60 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png index 97c2269..ef37a60 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png index eb3f91f..742a2db 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72.png index 80cfcd7..8fe04ac 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png index b655769..189884a 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png index 5e466bb..3dc7038 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png index fb89338..4d7165c 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png index b491803..19e53ac 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50.png index 65681a5..053412a 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png index 73f4c36..b409622 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small-50@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png index fc391b6..f74a0d8 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png index f91ff5e..d342b9f 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png index 00eaf9f..6559fce 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon.png index 943b3a2..2020590 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon@2x.png index 9c64019..d6e75cb 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/icon@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png index 33e94e0..f9465de 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/ios-marketing.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png index f2f6755..3283643 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png index 224d022..9b2356c 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon@3x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png index 2e91a42..0ddd779 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png index f2f6755..3283643 100644 Binary files a/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png and b/Tickmate/Tickmate/Resources/Assets.xcassets/AppIcon.appiconset/notification-icon~ipad@2x.png differ diff --git a/Tickmate/Tickmate/Resources/Assets.xcassets/Contents.json b/Tickmate/Tickmate/Resources/Assets.xcassets/Contents.json index 4aa7c53..da4a164 100644 --- a/Tickmate/Tickmate/Resources/Assets.xcassets/Contents.json +++ b/Tickmate/Tickmate/Resources/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "author" : "xcode", - "version" : 1 + "version" : 1, + "author" : "xcode" } } \ No newline at end of file diff --git a/Tickmate/Tickmate/Supplementary Views/AcknowledgementLink.swift b/Tickmate/Tickmate/Supplementary Views/AcknowledgementLink.swift index ec389bc..e6aee7a 100644 --- a/Tickmate/Tickmate/Supplementary Views/AcknowledgementLink.swift +++ b/Tickmate/Tickmate/Supplementary Views/AcknowledgementLink.swift @@ -64,11 +64,19 @@ struct AcknowledgementDetail: View { // MARK: Acknowledgement struct Acknowledgement: Hashable { + var name: String var copyright: String - var link: String? = nil + var link: String? var license: License + internal init(name: String, copyright: String, link: String?, license: Acknowledgement.License) { + self.name = name + self.copyright = copyright + self.link = link + self.license = license + } + enum License { case mit case bsd2 @@ -120,7 +128,7 @@ struct AcknowledgementLink_Previews: PreviewProvider { static var previews: some View { NavigationView { List { - AcknowledgementLink(acknowledgement, selection: .constant(nil)) + AcknowledgementLink(acknowledgement, selection: .constant(acknowledgement)) } .listStyle(InsetGroupedListStyle()) .navigationTitle("Acknowledgements") diff --git a/Tickmate/Tickmate/Views/AcknowledgementsView.swift b/Tickmate/Tickmate/Views/AcknowledgementsView.swift index 84682df..0728047 100644 --- a/Tickmate/Tickmate/Views/AcknowledgementsView.swift +++ b/Tickmate/Tickmate/Views/AcknowledgementsView.swift @@ -12,11 +12,12 @@ struct AcknowledgementsView: View { private var tickmateAcknowledgement = Acknowledgement( name: "BSD 2-Clause License", copyright: "2021, Isaac Lyons", + link: nil, license: .bsd2) private var acknowledgements = [ Acknowledgement(name: "SwiftDate", copyright: "2018 Daniele Margutti", link: "https://github.com/malcommac/SwiftDate", license: .mit), - Acknowledgement(name: "Introspect for SwiftUI", copyright: "2019 Timber Software", license: .mit) + Acknowledgement(name: "Introspect for SwiftUI", copyright: "2019 Timber Software", link: "https://github.com/siteline/SwiftUI-Introspect", license: .mit) ] @State private var selection: Acknowledgement? @@ -29,6 +30,16 @@ struct AcknowledgementsView: View { AcknowledgementLink(tickmateAcknowledgement, selection: $selection) } + Section { + Link(destination: URL(string: "https://github.com/lordi/tickmate")!) { + HStack { + TextWithCaption(text: "Based on Tickmate", caption: "by Hannes Gräuler") + Spacer() + Image(systemName: "arrow.up.right") + } + } + } + Section(header: Text("Libraries")) { ForEach(acknowledgements, id: \.self) { acknowledgement in AcknowledgementLink(acknowledgement, selection: $selection) diff --git a/Tickmate/Tickmate/Views/OnboardingView.swift b/Tickmate/Tickmate/Views/OnboardingView.swift index 9250f8a..bd2f282 100644 --- a/Tickmate/Tickmate/Views/OnboardingView.swift +++ b/Tickmate/Tickmate/Views/OnboardingView.swift @@ -19,16 +19,23 @@ struct OnboardingView: View { let bodyText = "Tickmate is a 1-bit journal for keeping track of any daily occurances." + " It's great for tracking habits you hope to build or break," + " so you can visualize your progress over time." + + "\nYou can also track any other occurances you might want to remember." @State private var showingPresets = false var body: some View { NavigationView { VStack { + HStack { + Text("Tickmate") + .padding() + .font(.bold(.largeTitle)()) + Spacer() + } + Spacer() LogoView() - .padding() - .scaleEffect() + .frame(maxHeight: 180) Spacer() Text(bodyText) @@ -36,6 +43,7 @@ struct OnboardingView: View { .multilineTextAlignment(.leading) .minimumScaleFactor(1.0) .fixedSize(horizontal: false, vertical: true) + Spacer() Button(action: start) { RoundedRectangle(cornerRadius: 10) @@ -59,7 +67,7 @@ struct OnboardingView: View { EmptyView() } } - .navigationTitle("Tickmate") + .navigationBarHidden(true) .padding(.bottom) } .navigationViewStyle(StackNavigationViewStyle()) @@ -105,7 +113,7 @@ struct LogoView: View { HStack { ForEach(0..<3) { column in RoundedRectangle(cornerRadius: 3.0) - .frame(width: 64, height: 32) + .aspectRatio(2, contentMode: .fit) .foregroundColor(ticked[row][column] ? colors[column] : Color(.systemFill)) } } @@ -120,6 +128,10 @@ struct OnboardingView_Previews: PreviewProvider { .previewDevice(PreviewDevice(rawValue: "iPhone 12 Pro Max")) .previewDisplayName("iPhone 12 Pro Max") + OnboardingView(showing: .constant(true)) + .previewDevice(PreviewDevice(rawValue: "iPhone SE (2nd generation)")) + .previewDisplayName("iPhone SE 2") + OnboardingView(showing: .constant(true)) .previewDevice(PreviewDevice(rawValue: "iPhone SE (1st generation)")) .previewDisplayName("iPhone SE") diff --git a/Tickmate/Tickmate/Views/SettingsView.swift b/Tickmate/Tickmate/Views/SettingsView.swift index e82fd1b..2230b31 100644 --- a/Tickmate/Tickmate/Views/SettingsView.swift +++ b/Tickmate/Tickmate/Views/SettingsView.swift @@ -81,7 +81,7 @@ struct SettingsView: View { } .navigationTitle("Settings") .toolbar { - ToolbarItem(placement: .navigation) { + ToolbarItem(placement: .primaryAction) { Button("Done") { showing = false }