├── .DS_Store ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── swift.yml ├── .gitignore ├── DailyTracker_UI.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── DailyTracker_UI └── iOS │ ├── Code │ ├── Common │ │ ├── Controllers │ │ │ └── DailyTracker_UIApp.swift │ │ ├── Extensions │ │ │ ├── FoundationExtensions.swift │ │ │ ├── UIApplicationExtension.swift │ │ │ └── ViewExtensions.swift │ │ ├── Utils │ │ │ ├── Colors.swift │ │ │ ├── Constants.swift │ │ │ ├── DateManager.swift │ │ │ ├── FontManager.swift │ │ │ └── HapticsManager.swift │ │ └── Views │ │ │ ├── Support Shapes │ │ │ └── AlertView.swift │ │ │ └── UserImageView.swift │ ├── Features │ │ └── Main │ │ │ ├── ViewModels │ │ │ └── MainViewModel.swift │ │ │ └── Views │ │ │ ├── MainView.swift │ │ │ └── Support Views │ │ │ └── TodayView.swift │ └── Persistence.swift │ └── Resources │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── EX.imageset │ │ ├── Contents.json │ │ └── EX.jpeg │ └── Image.imageset │ │ └── Contents.json │ ├── DailyTracker-UI-Info.plist │ ├── DailyTracker_UI.xcdatamodeld │ ├── .xccurrentversion │ └── DailyTracker_UI.xcdatamodel │ │ └── contents │ ├── Fonts │ ├── Bungee │ │ └── BungeeLayers-Regular.otf │ └── Degular │ │ ├── Degular-Bold.ttf │ │ ├── Degular-Medium.ttf │ │ ├── Degular-Regular.ttf │ │ └── Degular-Semibold.ttf │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── LICENSE ├── README.md └── docs ├── CONTRIBUTION.md └── Contributors.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/.DS_Store -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: shubham_iosdev 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'Bug - ' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: hacktoberfest 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/swift.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Swift project 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift 3 | 4 | name: Swift 5 | 6 | on: 7 | push: 8 | branches: [ "main" ] 9 | pull_request: 10 | branches: [ "main" ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: macos-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Build 20 | run: swift build -v 21 | - name: Run tests 22 | run: swift test -v 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /DailyTracker_UI.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 51A63DE92AD1ABD600901E2B /* DailyTracker_UIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63DE82AD1ABD600901E2B /* DailyTracker_UIApp.swift */; }; 11 | 51A63DEB2AD1ABD600901E2B /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63DEA2AD1ABD600901E2B /* MainView.swift */; }; 12 | 51A63DED2AD1ABD700901E2B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 51A63DEC2AD1ABD700901E2B /* Assets.xcassets */; }; 13 | 51A63DF02AD1ABD700901E2B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 51A63DEF2AD1ABD700901E2B /* Preview Assets.xcassets */; }; 14 | 51A63DF22AD1ABD700901E2B /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63DF12AD1ABD700901E2B /* Persistence.swift */; }; 15 | 51A63DF52AD1ABD700901E2B /* DailyTracker_UI.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 51A63DF32AD1ABD700901E2B /* DailyTracker_UI.xcdatamodeld */; }; 16 | 51A63E0A2AD1ADE600901E2B /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63E092AD1ADE600901E2B /* Constants.swift */; }; 17 | 51A63E0C2AD1AE2400901E2B /* FoundationExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63E0B2AD1AE2400901E2B /* FoundationExtensions.swift */; }; 18 | 51A63E0E2AD1AE2A00901E2B /* ViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63E0D2AD1AE2A00901E2B /* ViewExtensions.swift */; }; 19 | 51A63E102AD1B52000901E2B /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63E0F2AD1B52000901E2B /* Colors.swift */; }; 20 | 51A63E122AD1B58E00901E2B /* UIApplicationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A63E112AD1B58E00901E2B /* UIApplicationExtension.swift */; }; 21 | 51A901F22AE3BC3200AEFEE6 /* Degular-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51A901EE2AE3BC3200AEFEE6 /* Degular-Semibold.ttf */; }; 22 | 51A901F32AE3BC3200AEFEE6 /* Degular-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51A901EF2AE3BC3200AEFEE6 /* Degular-Bold.ttf */; }; 23 | 51A901F42AE3BC3200AEFEE6 /* Degular-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51A901F02AE3BC3200AEFEE6 /* Degular-Medium.ttf */; }; 24 | 51A901F52AE3BC3200AEFEE6 /* Degular-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 51A901F12AE3BC3200AEFEE6 /* Degular-Regular.ttf */; }; 25 | 51A901F72AE3BC3900AEFEE6 /* BungeeLayers-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 51A901F62AE3BC3900AEFEE6 /* BungeeLayers-Regular.otf */; }; 26 | 51A901F92AE3BC4900AEFEE6 /* FontManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A901F82AE3BC4900AEFEE6 /* FontManager.swift */; }; 27 | 51A901FB2AE3BC8800AEFEE6 /* DateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A901FA2AE3BC8800AEFEE6 /* DateManager.swift */; }; 28 | 51A901FE2AE3BCB800AEFEE6 /* TodayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A901FD2AE3BCB800AEFEE6 /* TodayView.swift */; }; 29 | 51A902012AE3C2AC00AEFEE6 /* MainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51A902002AE3C2AC00AEFEE6 /* MainViewModel.swift */; }; 30 | 86023F102AE686C2004AC376 /* HapticsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86023F0F2AE686C2004AC376 /* HapticsManager.swift */; }; 31 | 86FE6DCE2AE9558600340411 /* AlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86FE6DCD2AE9558600340411 /* AlertView.swift */; }; 32 | E59FBB112ADAC664002B6F16 /* UserImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E59FBB102ADAC664002B6F16 /* UserImageView.swift */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 51A63DE52AD1ABD600901E2B /* DailyTracker_UI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DailyTracker_UI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 51A63DE82AD1ABD600901E2B /* DailyTracker_UIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyTracker_UIApp.swift; sourceTree = ""; }; 38 | 51A63DEA2AD1ABD600901E2B /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; 39 | 51A63DEC2AD1ABD700901E2B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 40 | 51A63DEF2AD1ABD700901E2B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 41 | 51A63DF12AD1ABD700901E2B /* Persistence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Persistence.swift; sourceTree = ""; }; 42 | 51A63DF42AD1ABD700901E2B /* DailyTracker_UI.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = DailyTracker_UI.xcdatamodel; sourceTree = ""; }; 43 | 51A63E032AD1AD3500901E2B /* DailyTracker-UI-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "DailyTracker-UI-Info.plist"; path = "DailyTracker_UI/iOS/Resources/DailyTracker-UI-Info.plist"; sourceTree = SOURCE_ROOT; }; 44 | 51A63E092AD1ADE600901E2B /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; 45 | 51A63E0B2AD1AE2400901E2B /* FoundationExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FoundationExtensions.swift; sourceTree = ""; }; 46 | 51A63E0D2AD1AE2A00901E2B /* ViewExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewExtensions.swift; sourceTree = ""; }; 47 | 51A63E0F2AD1B52000901E2B /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; 48 | 51A63E112AD1B58E00901E2B /* UIApplicationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIApplicationExtension.swift; sourceTree = ""; }; 49 | 51A901EE2AE3BC3200AEFEE6 /* Degular-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Degular-Semibold.ttf"; sourceTree = ""; }; 50 | 51A901EF2AE3BC3200AEFEE6 /* Degular-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Degular-Bold.ttf"; sourceTree = ""; }; 51 | 51A901F02AE3BC3200AEFEE6 /* Degular-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Degular-Medium.ttf"; sourceTree = ""; }; 52 | 51A901F12AE3BC3200AEFEE6 /* Degular-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Degular-Regular.ttf"; sourceTree = ""; }; 53 | 51A901F62AE3BC3900AEFEE6 /* BungeeLayers-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BungeeLayers-Regular.otf"; sourceTree = ""; }; 54 | 51A901F82AE3BC4900AEFEE6 /* FontManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontManager.swift; sourceTree = ""; }; 55 | 51A901FA2AE3BC8800AEFEE6 /* DateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateManager.swift; sourceTree = ""; }; 56 | 51A901FD2AE3BCB800AEFEE6 /* TodayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayView.swift; sourceTree = ""; }; 57 | 51A902002AE3C2AC00AEFEE6 /* MainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewModel.swift; sourceTree = ""; }; 58 | 86023F0F2AE686C2004AC376 /* HapticsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HapticsManager.swift; sourceTree = ""; }; 59 | 86FE6DCD2AE9558600340411 /* AlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertView.swift; sourceTree = ""; }; 60 | E59FBB102ADAC664002B6F16 /* UserImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserImageView.swift; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 51A63DE22AD1ABD600901E2B /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 51A63DDC2AD1ABD600901E2B = { 75 | isa = PBXGroup; 76 | children = ( 77 | 51A63DE72AD1ABD600901E2B /* DailyTracker_UI */, 78 | 51A63DE62AD1ABD600901E2B /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | 51A63DE62AD1ABD600901E2B /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 51A63DE52AD1ABD600901E2B /* DailyTracker_UI.app */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | 51A63DE72AD1ABD600901E2B /* DailyTracker_UI */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 51A63DFB2AD1AC6E00901E2B /* iOS */, 94 | ); 95 | path = DailyTracker_UI; 96 | sourceTree = ""; 97 | }; 98 | 51A63DEE2AD1ABD700901E2B /* Preview Content */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 51A63DEF2AD1ABD700901E2B /* Preview Assets.xcassets */, 102 | ); 103 | path = "Preview Content"; 104 | sourceTree = ""; 105 | }; 106 | 51A63DFB2AD1AC6E00901E2B /* iOS */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 51A63DFD2AD1ACD000901E2B /* Code */, 110 | 51A63DFC2AD1ACBD00901E2B /* Resources */, 111 | ); 112 | path = iOS; 113 | sourceTree = ""; 114 | }; 115 | 51A63DFC2AD1ACBD00901E2B /* Resources */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 51A63E032AD1AD3500901E2B /* DailyTracker-UI-Info.plist */, 119 | 51A63DEC2AD1ABD700901E2B /* Assets.xcassets */, 120 | 51A63DF32AD1ABD700901E2B /* DailyTracker_UI.xcdatamodeld */, 121 | 51A63E022AD1AD2C00901E2B /* Fonts */, 122 | 51A63DEE2AD1ABD700901E2B /* Preview Content */, 123 | ); 124 | path = Resources; 125 | sourceTree = ""; 126 | }; 127 | 51A63DFD2AD1ACD000901E2B /* Code */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 51A63E042AD1ADC800901E2B /* Common */, 131 | 51A63DFF2AD1ACE400901E2B /* Features */, 132 | 51A63DF12AD1ABD700901E2B /* Persistence.swift */, 133 | ); 134 | path = Code; 135 | sourceTree = ""; 136 | }; 137 | 51A63DFE2AD1ACDF00901E2B /* Controllers */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 51A63DE82AD1ABD600901E2B /* DailyTracker_UIApp.swift */, 141 | ); 142 | path = Controllers; 143 | sourceTree = ""; 144 | }; 145 | 51A63DFF2AD1ACE400901E2B /* Features */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 51A63E012AD1ACEC00901E2B /* Main */, 149 | ); 150 | path = Features; 151 | sourceTree = ""; 152 | }; 153 | 51A63E002AD1ACE700901E2B /* Views */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 51A901FC2AE3BCAA00AEFEE6 /* Support Views */, 157 | 51A63DEA2AD1ABD600901E2B /* MainView.swift */, 158 | ); 159 | path = Views; 160 | sourceTree = ""; 161 | }; 162 | 51A63E012AD1ACEC00901E2B /* Main */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 51A901FF2AE3C2A200AEFEE6 /* ViewModels */, 166 | 51A63E002AD1ACE700901E2B /* Views */, 167 | ); 168 | path = Main; 169 | sourceTree = ""; 170 | }; 171 | 51A63E022AD1AD2C00901E2B /* Fonts */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 51A901ED2AE3BC2400AEFEE6 /* Bungee */, 175 | 51A901EC2AE3BC1F00AEFEE6 /* Degular */, 176 | ); 177 | path = Fonts; 178 | sourceTree = ""; 179 | }; 180 | 51A63E042AD1ADC800901E2B /* Common */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 51A63DFE2AD1ACDF00901E2B /* Controllers */, 184 | 51A63E072AD1ADD100901E2B /* Extensions */, 185 | 51A63E052AD1ADCC00901E2B /* Models */, 186 | 51A63E082AD1ADD400901E2B /* Utils */, 187 | 51C665DC2AE293E00072745F /* Views */, 188 | ); 189 | path = Common; 190 | sourceTree = ""; 191 | }; 192 | 51A63E052AD1ADCC00901E2B /* Models */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | ); 196 | path = Models; 197 | sourceTree = ""; 198 | }; 199 | 51A63E072AD1ADD100901E2B /* Extensions */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 51A63E0B2AD1AE2400901E2B /* FoundationExtensions.swift */, 203 | 51A63E0D2AD1AE2A00901E2B /* ViewExtensions.swift */, 204 | 51A63E112AD1B58E00901E2B /* UIApplicationExtension.swift */, 205 | ); 206 | path = Extensions; 207 | sourceTree = ""; 208 | }; 209 | 51A63E082AD1ADD400901E2B /* Utils */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 51A63E092AD1ADE600901E2B /* Constants.swift */, 213 | 51A63E0F2AD1B52000901E2B /* Colors.swift */, 214 | 51A901F82AE3BC4900AEFEE6 /* FontManager.swift */, 215 | 51A901FA2AE3BC8800AEFEE6 /* DateManager.swift */, 216 | 86023F0F2AE686C2004AC376 /* HapticsManager.swift */, 217 | ); 218 | path = Utils; 219 | sourceTree = ""; 220 | }; 221 | 51A901EC2AE3BC1F00AEFEE6 /* Degular */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 51A901EF2AE3BC3200AEFEE6 /* Degular-Bold.ttf */, 225 | 51A901F02AE3BC3200AEFEE6 /* Degular-Medium.ttf */, 226 | 51A901F12AE3BC3200AEFEE6 /* Degular-Regular.ttf */, 227 | 51A901EE2AE3BC3200AEFEE6 /* Degular-Semibold.ttf */, 228 | ); 229 | path = Degular; 230 | sourceTree = ""; 231 | }; 232 | 51A901ED2AE3BC2400AEFEE6 /* Bungee */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 51A901F62AE3BC3900AEFEE6 /* BungeeLayers-Regular.otf */, 236 | ); 237 | path = Bungee; 238 | sourceTree = ""; 239 | }; 240 | 51A901FC2AE3BCAA00AEFEE6 /* Support Views */ = { 241 | isa = PBXGroup; 242 | children = ( 243 | 51A901FD2AE3BCB800AEFEE6 /* TodayView.swift */, 244 | ); 245 | path = "Support Views"; 246 | sourceTree = ""; 247 | }; 248 | 51A901FF2AE3C2A200AEFEE6 /* ViewModels */ = { 249 | isa = PBXGroup; 250 | children = ( 251 | 51A902002AE3C2AC00AEFEE6 /* MainViewModel.swift */, 252 | ); 253 | path = ViewModels; 254 | sourceTree = ""; 255 | }; 256 | 51C665DC2AE293E00072745F /* Views */ = { 257 | isa = PBXGroup; 258 | children = ( 259 | 86FE6DCC2AE9556600340411 /* Support Shapes */, 260 | E59FBB102ADAC664002B6F16 /* UserImageView.swift */, 261 | ); 262 | path = Views; 263 | sourceTree = ""; 264 | }; 265 | 86FE6DCC2AE9556600340411 /* Support Shapes */ = { 266 | isa = PBXGroup; 267 | children = ( 268 | 86FE6DCD2AE9558600340411 /* AlertView.swift */, 269 | ); 270 | path = "Support Shapes"; 271 | sourceTree = ""; 272 | }; 273 | /* End PBXGroup section */ 274 | 275 | /* Begin PBXNativeTarget section */ 276 | 51A63DE42AD1ABD600901E2B /* DailyTracker_UI */ = { 277 | isa = PBXNativeTarget; 278 | buildConfigurationList = 51A63DF82AD1ABD700901E2B /* Build configuration list for PBXNativeTarget "DailyTracker_UI" */; 279 | buildPhases = ( 280 | 51A63DE12AD1ABD600901E2B /* Sources */, 281 | 51A63DE22AD1ABD600901E2B /* Frameworks */, 282 | 51A63DE32AD1ABD600901E2B /* Resources */, 283 | ); 284 | buildRules = ( 285 | ); 286 | dependencies = ( 287 | ); 288 | name = DailyTracker_UI; 289 | productName = DailyTracker_UI; 290 | productReference = 51A63DE52AD1ABD600901E2B /* DailyTracker_UI.app */; 291 | productType = "com.apple.product-type.application"; 292 | }; 293 | /* End PBXNativeTarget section */ 294 | 295 | /* Begin PBXProject section */ 296 | 51A63DDD2AD1ABD600901E2B /* Project object */ = { 297 | isa = PBXProject; 298 | attributes = { 299 | BuildIndependentTargetsInParallel = 1; 300 | LastSwiftUpdateCheck = 1430; 301 | LastUpgradeCheck = 1430; 302 | TargetAttributes = { 303 | 51A63DE42AD1ABD600901E2B = { 304 | CreatedOnToolsVersion = 14.3.1; 305 | }; 306 | }; 307 | }; 308 | buildConfigurationList = 51A63DE02AD1ABD600901E2B /* Build configuration list for PBXProject "DailyTracker_UI" */; 309 | compatibilityVersion = "Xcode 14.0"; 310 | developmentRegion = en; 311 | hasScannedForEncodings = 0; 312 | knownRegions = ( 313 | en, 314 | Base, 315 | ); 316 | mainGroup = 51A63DDC2AD1ABD600901E2B; 317 | productRefGroup = 51A63DE62AD1ABD600901E2B /* Products */; 318 | projectDirPath = ""; 319 | projectRoot = ""; 320 | targets = ( 321 | 51A63DE42AD1ABD600901E2B /* DailyTracker_UI */, 322 | ); 323 | }; 324 | /* End PBXProject section */ 325 | 326 | /* Begin PBXResourcesBuildPhase section */ 327 | 51A63DE32AD1ABD600901E2B /* Resources */ = { 328 | isa = PBXResourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 51A901F52AE3BC3200AEFEE6 /* Degular-Regular.ttf in Resources */, 332 | 51A901F22AE3BC3200AEFEE6 /* Degular-Semibold.ttf in Resources */, 333 | 51A63DF02AD1ABD700901E2B /* Preview Assets.xcassets in Resources */, 334 | 51A901F72AE3BC3900AEFEE6 /* BungeeLayers-Regular.otf in Resources */, 335 | 51A901F42AE3BC3200AEFEE6 /* Degular-Medium.ttf in Resources */, 336 | 51A901F32AE3BC3200AEFEE6 /* Degular-Bold.ttf in Resources */, 337 | 51A63DED2AD1ABD700901E2B /* Assets.xcassets in Resources */, 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | /* End PBXResourcesBuildPhase section */ 342 | 343 | /* Begin PBXSourcesBuildPhase section */ 344 | 51A63DE12AD1ABD600901E2B /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | 51A63E0A2AD1ADE600901E2B /* Constants.swift in Sources */, 349 | 51A901FB2AE3BC8800AEFEE6 /* DateManager.swift in Sources */, 350 | 51A63E102AD1B52000901E2B /* Colors.swift in Sources */, 351 | 86023F102AE686C2004AC376 /* HapticsManager.swift in Sources */, 352 | E59FBB112ADAC664002B6F16 /* UserImageView.swift in Sources */, 353 | 51A63E0E2AD1AE2A00901E2B /* ViewExtensions.swift in Sources */, 354 | 51A63DF52AD1ABD700901E2B /* DailyTracker_UI.xcdatamodeld in Sources */, 355 | 51A901FE2AE3BCB800AEFEE6 /* TodayView.swift in Sources */, 356 | 51A902012AE3C2AC00AEFEE6 /* MainViewModel.swift in Sources */, 357 | 51A63E0C2AD1AE2400901E2B /* FoundationExtensions.swift in Sources */, 358 | 51A901F92AE3BC4900AEFEE6 /* FontManager.swift in Sources */, 359 | 51A63DF22AD1ABD700901E2B /* Persistence.swift in Sources */, 360 | 51A63E122AD1B58E00901E2B /* UIApplicationExtension.swift in Sources */, 361 | 86FE6DCE2AE9558600340411 /* AlertView.swift in Sources */, 362 | 51A63DEB2AD1ABD600901E2B /* MainView.swift in Sources */, 363 | 51A63DE92AD1ABD600901E2B /* DailyTracker_UIApp.swift in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | /* End PBXSourcesBuildPhase section */ 368 | 369 | /* Begin XCBuildConfiguration section */ 370 | 51A63DF62AD1ABD700901E2B /* Debug */ = { 371 | isa = XCBuildConfiguration; 372 | buildSettings = { 373 | ALWAYS_SEARCH_USER_PATHS = NO; 374 | CLANG_ANALYZER_NONNULL = YES; 375 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 376 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_ENABLE_OBJC_WEAK = YES; 380 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 381 | CLANG_WARN_BOOL_CONVERSION = YES; 382 | CLANG_WARN_COMMA = YES; 383 | CLANG_WARN_CONSTANT_CONVERSION = YES; 384 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 386 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INFINITE_RECURSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 392 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 393 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = dwarf; 404 | ENABLE_STRICT_OBJC_MSGSEND = YES; 405 | ENABLE_TESTABILITY = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu11; 407 | GCC_DYNAMIC_NO_PIC = NO; 408 | GCC_NO_COMMON_BLOCKS = YES; 409 | GCC_OPTIMIZATION_LEVEL = 0; 410 | GCC_PREPROCESSOR_DEFINITIONS = ( 411 | "DEBUG=1", 412 | "$(inherited)", 413 | ); 414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 416 | GCC_WARN_UNDECLARED_SELECTOR = YES; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 418 | GCC_WARN_UNUSED_FUNCTION = YES; 419 | GCC_WARN_UNUSED_VARIABLE = YES; 420 | IPHONEOS_DEPLOYMENT_TARGET = 16.4; 421 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 422 | MTL_FAST_MATH = YES; 423 | ONLY_ACTIVE_ARCH = YES; 424 | SDKROOT = iphoneos; 425 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 426 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 427 | }; 428 | name = Debug; 429 | }; 430 | 51A63DF72AD1ABD700901E2B /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_SEARCH_USER_PATHS = NO; 434 | CLANG_ANALYZER_NONNULL = YES; 435 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 436 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 437 | CLANG_ENABLE_MODULES = YES; 438 | CLANG_ENABLE_OBJC_ARC = YES; 439 | CLANG_ENABLE_OBJC_WEAK = YES; 440 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 441 | CLANG_WARN_BOOL_CONVERSION = YES; 442 | CLANG_WARN_COMMA = YES; 443 | CLANG_WARN_CONSTANT_CONVERSION = YES; 444 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 445 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 446 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 447 | CLANG_WARN_EMPTY_BODY = YES; 448 | CLANG_WARN_ENUM_CONVERSION = YES; 449 | CLANG_WARN_INFINITE_RECURSION = YES; 450 | CLANG_WARN_INT_CONVERSION = YES; 451 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 452 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 453 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 454 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 455 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 456 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 457 | CLANG_WARN_STRICT_PROTOTYPES = YES; 458 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 459 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 460 | CLANG_WARN_UNREACHABLE_CODE = YES; 461 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 462 | COPY_PHASE_STRIP = NO; 463 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 464 | ENABLE_NS_ASSERTIONS = NO; 465 | ENABLE_STRICT_OBJC_MSGSEND = YES; 466 | GCC_C_LANGUAGE_STANDARD = gnu11; 467 | GCC_NO_COMMON_BLOCKS = YES; 468 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 469 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 470 | GCC_WARN_UNDECLARED_SELECTOR = YES; 471 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 472 | GCC_WARN_UNUSED_FUNCTION = YES; 473 | GCC_WARN_UNUSED_VARIABLE = YES; 474 | IPHONEOS_DEPLOYMENT_TARGET = 16.4; 475 | MTL_ENABLE_DEBUG_INFO = NO; 476 | MTL_FAST_MATH = YES; 477 | SDKROOT = iphoneos; 478 | SWIFT_COMPILATION_MODE = wholemodule; 479 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 480 | VALIDATE_PRODUCT = YES; 481 | }; 482 | name = Release; 483 | }; 484 | 51A63DF92AD1ABD700901E2B /* Debug */ = { 485 | isa = XCBuildConfiguration; 486 | buildSettings = { 487 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 488 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 489 | CODE_SIGN_STYLE = Automatic; 490 | CURRENT_PROJECT_VERSION = 1; 491 | DEVELOPMENT_ASSET_PATHS = "\"DailyTracker_UI/iOS/Resources/Preview Content\""; 492 | DEVELOPMENT_TEAM = 922R4697G4; 493 | ENABLE_PREVIEWS = YES; 494 | GENERATE_INFOPLIST_FILE = YES; 495 | INFOPLIST_FILE = "DailyTracker_UI/iOS/Resources/DailyTracker-UI-Info.plist"; 496 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 497 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 498 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 499 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 500 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 501 | LD_RUNPATH_SEARCH_PATHS = ( 502 | "$(inherited)", 503 | "@executable_path/Frameworks", 504 | ); 505 | MARKETING_VERSION = 1.0; 506 | PRODUCT_BUNDLE_IDENTIFIER = "com.shubham-iosdev.DailyTracker-UI"; 507 | PRODUCT_NAME = "$(TARGET_NAME)"; 508 | SWIFT_EMIT_LOC_STRINGS = YES; 509 | SWIFT_VERSION = 5.0; 510 | TARGETED_DEVICE_FAMILY = "1,2"; 511 | }; 512 | name = Debug; 513 | }; 514 | 51A63DFA2AD1ABD700901E2B /* Release */ = { 515 | isa = XCBuildConfiguration; 516 | buildSettings = { 517 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 518 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 519 | CODE_SIGN_STYLE = Automatic; 520 | CURRENT_PROJECT_VERSION = 1; 521 | DEVELOPMENT_ASSET_PATHS = "\"DailyTracker_UI/iOS/Resources/Preview Content\""; 522 | DEVELOPMENT_TEAM = 922R4697G4; 523 | ENABLE_PREVIEWS = YES; 524 | GENERATE_INFOPLIST_FILE = YES; 525 | INFOPLIST_FILE = "DailyTracker_UI/iOS/Resources/DailyTracker-UI-Info.plist"; 526 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 527 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 528 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 529 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 530 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 531 | LD_RUNPATH_SEARCH_PATHS = ( 532 | "$(inherited)", 533 | "@executable_path/Frameworks", 534 | ); 535 | MARKETING_VERSION = 1.0; 536 | PRODUCT_BUNDLE_IDENTIFIER = "com.shubham-iosdev.DailyTracker-UI"; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | SWIFT_EMIT_LOC_STRINGS = YES; 539 | SWIFT_VERSION = 5.0; 540 | TARGETED_DEVICE_FAMILY = "1,2"; 541 | }; 542 | name = Release; 543 | }; 544 | /* End XCBuildConfiguration section */ 545 | 546 | /* Begin XCConfigurationList section */ 547 | 51A63DE02AD1ABD600901E2B /* Build configuration list for PBXProject "DailyTracker_UI" */ = { 548 | isa = XCConfigurationList; 549 | buildConfigurations = ( 550 | 51A63DF62AD1ABD700901E2B /* Debug */, 551 | 51A63DF72AD1ABD700901E2B /* Release */, 552 | ); 553 | defaultConfigurationIsVisible = 0; 554 | defaultConfigurationName = Release; 555 | }; 556 | 51A63DF82AD1ABD700901E2B /* Build configuration list for PBXNativeTarget "DailyTracker_UI" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 51A63DF92AD1ABD700901E2B /* Debug */, 560 | 51A63DFA2AD1ABD700901E2B /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | /* End XCConfigurationList section */ 566 | 567 | /* Begin XCVersionGroup section */ 568 | 51A63DF32AD1ABD700901E2B /* DailyTracker_UI.xcdatamodeld */ = { 569 | isa = XCVersionGroup; 570 | children = ( 571 | 51A63DF42AD1ABD700901E2B /* DailyTracker_UI.xcdatamodel */, 572 | ); 573 | currentVersion = 51A63DF42AD1ABD700901E2B /* DailyTracker_UI.xcdatamodel */; 574 | path = DailyTracker_UI.xcdatamodeld; 575 | sourceTree = ""; 576 | versionGroupType = wrapper.xcdatamodel; 577 | }; 578 | /* End XCVersionGroup section */ 579 | }; 580 | rootObject = 51A63DDD2AD1ABD600901E2B /* Project object */; 581 | } 582 | -------------------------------------------------------------------------------- /DailyTracker_UI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DailyTracker_UI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Controllers/DailyTracker_UIApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DailyTracker_UIApp.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct DailyTracker_UIApp: App { 12 | let persistenceController = PersistenceController.shared 13 | 14 | var body: some Scene { 15 | WindowGroup { 16 | MainView() 17 | .environment(\.managedObjectContext, persistenceController.container.viewContext) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Extensions/FoundationExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FoundationExtensions.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import UIKit 9 | 10 | extension Int { 11 | func appendZeros() -> String { 12 | if (self < 10) { 13 | return "0\(self)" 14 | } else { 15 | return "\(self)" 16 | } 17 | } 18 | 19 | func degreeToRadians() -> CGFloat { 20 | return (CGFloat(self) * .pi) / 180 21 | } 22 | } 23 | 24 | extension Double { 25 | func convert(fromRange: (Double, Double), toRange: (Double, Double)) -> Double { 26 | var value = self 27 | value -= fromRange.0 28 | value /= Double(fromRange.1 - fromRange.0) 29 | value *= toRange.1 - toRange.0 30 | value += toRange.0 31 | return value 32 | } 33 | func clean(places: Int) -> String { 34 | return self.truncatingRemainder(dividingBy: 1) == 0 ? String(format: "%.0f", self) : String(format: "%.\(places)f", self) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Extensions/UIApplicationExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplicationExtension.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension UIApplication { 11 | func endEditing() { 12 | sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Extensions/ViewExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewExtensions.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension View { 11 | @ViewBuilder func `if`(_ condition: Bool, transform: (Self) -> Content) -> some View { 12 | if condition { 13 | transform(self) 14 | } else { 15 | self 16 | } 17 | } 18 | 19 | /// Presents a customized alert view with a given title, message, close button, dismiss button. 20 | func alert(title: String = "", message: String = "", closeButton: CloseAlertButton = CloseAlertButton(systemName: "xmark"), dismissButton: AlertButton = AlertButton(title: "OK", color: .purple), isPresented: Binding) -> some View { 21 | // Localize the title and message for internationalization. 22 | let title = NSLocalizedString(title, comment: "") 23 | let message = NSLocalizedString(message, comment: "") 24 | 25 | // Apply the custom alert modifier to the view. 26 | return modifier(CustomAlertModifier(title: title, message: message, closeButton: closeButton, dismissButton: dismissButton, isPresented: isPresented)) 27 | } 28 | 29 | /// Presents a customized alert view with a given title, message, close button, primary button, secondary button. 30 | func alert(title: String = "", message: String = "", closeButton: CloseAlertButton = CloseAlertButton(systemName: "xmark"), primaryButton: AlertButton, secondaryButton: AlertButton, isPresented: Binding) -> some View { 31 | // Localize the title and message for internationalization. 32 | let title = NSLocalizedString(title, comment: "") 33 | let message = NSLocalizedString(message, comment: "") 34 | 35 | // Apply the custom alert modifier to the view. 36 | return modifier(CustomAlertModifier(title: title, message: message, closeButton: closeButton, primaryButton: primaryButton, secondaryButton: secondaryButton, isPresented: isPresented)) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Utils/Colors.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Colors.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension Color { 11 | static let background: Color = Color(UIColor.systemBackground) 12 | static let label: Color = Color(UIColor.label) 13 | 14 | } 15 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Utils/Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Constants.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Constants { 11 | private let itemFormatter: DateFormatter = { 12 | let formatter = DateFormatter() 13 | formatter.dateStyle = .short 14 | formatter.timeStyle = .medium 15 | return formatter 16 | }() 17 | } 18 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Utils/DateManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DateManager.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 21/10/23. 6 | // 7 | 8 | import Foundation 9 | 10 | struct DateManager { 11 | var dateFormatter: DateFormatter = { 12 | let formatter = DateFormatter() 13 | formatter.dateFormat = "dd" 14 | return formatter 15 | }() 16 | 17 | var dayFormatter: DateFormatter = { 18 | let formatter = DateFormatter() 19 | formatter.dateFormat = "MMM" 20 | return formatter 21 | }() 22 | 23 | 24 | func getCurrentDate() -> String { 25 | return dateFormatter.string(from: Date()) 26 | } 27 | 28 | func getCurrentDay() -> String { 29 | return dayFormatter.string(from: Date()) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Utils/FontManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontManager.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 21/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | enum TypefaceOne { 11 | case regular 12 | 13 | 14 | func font(size: CGFloat) -> Font { 15 | switch self { 16 | case .regular: 17 | return .custom("BungeeLayers-Regular", size: size) 18 | } 19 | } 20 | } 21 | 22 | enum TypefaceTwo { 23 | case regular 24 | case medium 25 | case semibold 26 | case bold 27 | 28 | func font(size: CGFloat) -> Font { 29 | switch self { 30 | case .regular: 31 | return .custom("Degular-Regular", size: size) 32 | case .medium: 33 | return .custom("Degular-Medium", size: size) 34 | case .semibold: 35 | return .custom("Degular-SemiBold", size: size) 36 | case .bold: 37 | return .custom("Degular-Bold", size: size) 38 | 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Utils/HapticsManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HapticsManager.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Mark Golubev on 23/10/2023. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | /// `HapticsManager` provides methods for generating haptic feedback in the application. 12 | final class HapticsManager { 13 | 14 | static let shared = HapticsManager() 15 | private init() { } 16 | 17 | /// Triggers impact haptic feedback with the specified style. 18 | /// 19 | /// - Parameter style: The style of impact feedback to be generated. 20 | func impactFeedback(_ style: UIImpactFeedbackGenerator.FeedbackStyle = .light) { 21 | let impact = UIImpactFeedbackGenerator(style: style) 22 | impact.impactOccurred() 23 | } 24 | 25 | /// Triggers notification haptic feedback with the specified type. 26 | /// 27 | /// - Parameter type: The type of notification feedback to be generated. 28 | func notificationFeedback(_ type: UINotificationFeedbackGenerator.FeedbackType) { 29 | let generator = UINotificationFeedbackGenerator() 30 | generator.notificationOccurred(type) 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Views/Support Shapes/AlertView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AlertView.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Mark Golubev on 25/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct AlertView: View { 11 | 12 | // MARK: - Public Properties 13 | let title: String 14 | let message: String 15 | let closeButton: CloseAlertButton? 16 | let dismissButton: AlertButton? 17 | let primaryButton: AlertButton? 18 | let secondaryButton: AlertButton? 19 | 20 | // MARK: Private Properties 21 | @State private var opacity: CGFloat = 0 22 | @State private var backgroundOpacity: CGFloat = 0 23 | @State private var scale: CGFloat = 0.001 24 | 25 | @Environment(\.dismiss) private var dismiss 26 | 27 | 28 | // MARK: - Body 29 | var body: some View { 30 | // Main content of the alert view. 31 | Color.clear 32 | .overlay( 33 | ZStack { 34 | dimView 35 | alertView 36 | .scaleEffect(scale) 37 | .opacity(opacity) 38 | } 39 | .transition(.opacity) 40 | 41 | ) 42 | .ignoresSafeArea() 43 | .task { 44 | animate(isShown: true) 45 | } 46 | } 47 | 48 | // MARK: - Private View 49 | // MARK: Alert View 50 | private var alertView: some View { 51 | VStack(spacing: 20) { 52 | 53 | HStack(alignment: .top, content: { 54 | Spacer() 55 | closeButtonView 56 | }) 57 | titleView 58 | messageView 59 | buttonsView 60 | } 61 | .padding(24) 62 | .frame(width: 320) 63 | .background(.white) 64 | .cornerRadius(12) 65 | .shadow(color: Color.black.opacity(0.4), radius: 16, x: 0, y: 12) 66 | } 67 | 68 | // MARK: Title View 69 | @ViewBuilder 70 | private var titleView: some View { 71 | if !title.isEmpty { 72 | Text(title) 73 | .font(Font.custom("Degular-Bold", size: 18)) 74 | .foregroundColor(.black) 75 | .lineSpacing(24 - UIFont.systemFont(ofSize: 18, weight: .bold).lineHeight) 76 | .multilineTextAlignment(.leading) 77 | .frame(maxWidth: .infinity, alignment: .leading) 78 | } 79 | } 80 | 81 | // MARK: Message View 82 | @ViewBuilder 83 | private var messageView: some View { 84 | if !message.isEmpty { 85 | Text(message) 86 | .font(Font.custom("Degular-Regular", size: title.isEmpty ? 18 : 16)) 87 | .foregroundColor(title.isEmpty ? .black : .gray) 88 | .lineSpacing(24 - UIFont.systemFont(ofSize: title.isEmpty ? 18 : 16).lineHeight) 89 | .multilineTextAlignment(.leading) 90 | .frame(maxWidth: .infinity, alignment: .leading) 91 | } 92 | } 93 | 94 | // MARK: Buttons View 95 | private var buttonsView: some View { 96 | HStack(spacing: 12) { 97 | if dismissButton != nil { 98 | dismissButtonView 99 | 100 | } else if primaryButton != nil, secondaryButton != nil { 101 | secondaryButtonView 102 | primaryButtonView 103 | } 104 | } 105 | .padding(.top, 23) 106 | } 107 | 108 | // MARK: Primary Button View 109 | @ViewBuilder 110 | private var primaryButtonView: some View { 111 | if let button = primaryButton { 112 | AlertButton(title: button.title, color: button.color) { 113 | animate(isShown: false) { 114 | dismiss() 115 | } 116 | 117 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { 118 | button.action?() 119 | } 120 | } 121 | } 122 | } 123 | 124 | // MARK: Secondary Button View 125 | @ViewBuilder 126 | private var secondaryButtonView: some View { 127 | if let button = secondaryButton { 128 | AlertButton(title: button.title, color: button.color) { 129 | animate(isShown: false) { 130 | dismiss() 131 | } 132 | 133 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { 134 | button.action?() 135 | } 136 | } 137 | } 138 | } 139 | 140 | // MARK: Dismiss Button View 141 | @ViewBuilder 142 | private var dismissButtonView: some View { 143 | if let button = dismissButton { 144 | AlertButton(title: button.title , color: button.color) { 145 | animate(isShown: false) { 146 | dismiss() 147 | } 148 | 149 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { 150 | button.action?() 151 | } 152 | } 153 | } 154 | } 155 | 156 | // MARK: Close Button View 157 | @ViewBuilder 158 | private var closeButtonView: some View { 159 | if let button = closeButton { 160 | CloseAlertButton(systemName: button.systemName) { 161 | animate(isShown: false) { 162 | dismiss() 163 | } 164 | 165 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { 166 | button.action?() 167 | } 168 | } 169 | } 170 | } 171 | 172 | // MARK: Dim Background View 173 | private var dimView: some View { 174 | Color.gray 175 | .opacity(0.88) 176 | .opacity(backgroundOpacity) 177 | .onTapGesture { 178 | animate(isShown: false) { 179 | dismiss() 180 | } 181 | } 182 | } 183 | 184 | 185 | // MARK: - Private Functions 186 | 187 | /// Animates the appearance/disappearance of the alert view. 188 | /// - Parameters: 189 | /// - isShown: A boolean indicating whether the alert view should be shown or hidden. 190 | /// - completion: A closure to be executed after the animation completes. 191 | private func animate(isShown: Bool, completion: (() -> Void)? = nil) { 192 | // Animation logic for showing/hiding the alert view 193 | switch isShown { 194 | case true: 195 | opacity = 1 196 | 197 | withAnimation(.spring(response: 0.3, dampingFraction: 0.9, blendDuration: 0).delay(0.4)) { 198 | backgroundOpacity = 0.5 199 | scale = 1 200 | } 201 | 202 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) { 203 | completion?() 204 | } 205 | 206 | case false: 207 | withAnimation(.easeOut(duration: 0.2)) { 208 | backgroundOpacity = 0 209 | opacity = 0 210 | } 211 | 212 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { 213 | completion?() 214 | } 215 | } 216 | } 217 | } 218 | 219 | // MARK: - Alert Button 220 | /// Represents a button used in the custom alert view. 221 | struct AlertButton: View { 222 | 223 | // MARK: - Public Properties 224 | let title: LocalizedStringKey 225 | let color: Color 226 | var action: (() -> Void)? = nil 227 | 228 | 229 | // MARK: - Body 230 | var body: some View { 231 | Button { 232 | action?() 233 | 234 | } label: { 235 | Text(title) 236 | .font(.system(size: 14, weight: .medium)) 237 | .foregroundColor(.white) 238 | .padding(.horizontal, 20) 239 | } 240 | .frame(minWidth: 0, maxWidth: .infinity, alignment: .center) 241 | .frame(height: 44) 242 | .background(color) 243 | .cornerRadius(8) 244 | 245 | } 246 | } 247 | 248 | // MARK: - Close Alert Buton 249 | /// Represents a close button used in the custom alert view. 250 | struct CloseAlertButton: View { 251 | 252 | // MARK: - Public Properties 253 | let systemName: String 254 | var action: (() -> Void)? = nil 255 | 256 | 257 | // MARK: - Body 258 | var body: some View { 259 | Button { 260 | action?() 261 | 262 | } label: { 263 | Image(systemName: systemName) 264 | .foregroundStyle(.gray, .gray.opacity(0.2)) 265 | } 266 | .frame(height: 10) 267 | } 268 | } 269 | 270 | // MARK: - Custom Alert Modifier 271 | /// A view modifier for presenting the custom alert view as a full-screen cover. 272 | struct CustomAlertModifier { 273 | 274 | // MARK: - Private Properties 275 | @Binding private var isPresented: Bool 276 | @State private var internalIsPresented = true 277 | 278 | private let title: String 279 | private let message: String 280 | private let closeButton: CloseAlertButton? 281 | private let dismissButton: AlertButton? 282 | private let primaryButton: AlertButton? 283 | private let secondaryButton: AlertButton? 284 | } 285 | 286 | extension CustomAlertModifier: ViewModifier { 287 | @ViewBuilder 288 | func body(content: Content) -> some View { 289 | // Applies the alert view as a full-screen cover with the specified properties. 290 | content 291 | .fullScreenCover(isPresented: $isPresented) { 292 | ZStack{ 293 | AlertView(title: title, message: message, closeButton: closeButton, dismissButton: dismissButton, primaryButton: primaryButton, secondaryButton: secondaryButton) 294 | } 295 | .presentationBackground(.clear) 296 | 297 | } 298 | 299 | } 300 | 301 | 302 | } 303 | 304 | extension CustomAlertModifier { 305 | 306 | /// Initializes the modifier with a close button and a dismiss button. 307 | init(title: String = "", message: String = "", closeButton: CloseAlertButton, dismissButton: AlertButton, isPresented: Binding) { 308 | self.title = title 309 | self.message = message 310 | self.closeButton = closeButton 311 | self.dismissButton = dismissButton 312 | 313 | self.primaryButton = nil 314 | self.secondaryButton = nil 315 | 316 | _isPresented = isPresented 317 | } 318 | 319 | /// Initializes the modifier with a close button, a primary button, and a secondary button. 320 | init(title: String = "", message: String = "", closeButton: CloseAlertButton, primaryButton: AlertButton, secondaryButton: AlertButton, isPresented: Binding) { 321 | self.title = title 322 | self.message = message 323 | self.closeButton = closeButton 324 | self.primaryButton = primaryButton 325 | self.secondaryButton = secondaryButton 326 | 327 | self.dismissButton = nil 328 | 329 | _isPresented = isPresented 330 | } 331 | } 332 | 333 | #if DEBUG 334 | struct AlertView_Previews: PreviewProvider { 335 | 336 | static var previews: some View { 337 | let dismissButton = AlertButton(title: "OK", color: .green) 338 | let primaryButton = AlertButton(title: "Got it", color: .purple) 339 | let secondaryButton = AlertButton(title: "Cancel", color: .red) 340 | let closeButton = CloseAlertButton(systemName: "xmark") 341 | 342 | let title = "This is your life. Do what you want and do it often." 343 | let message = """ 344 | If you don't like something, change it. 345 | If you don't like your job, quit. 346 | If you don't have enough time, stop watching TV. 347 | """ 348 | 349 | return VStack { 350 | AlertView(title: title, message: message, closeButton: closeButton, dismissButton: nil, primaryButton: nil, secondaryButton: nil) 351 | AlertView(title: title, message: message, closeButton: closeButton, dismissButton: dismissButton, primaryButton: nil, secondaryButton: nil) 352 | AlertView(title: title, message: message, closeButton: closeButton, dismissButton: nil, primaryButton: primaryButton, secondaryButton: secondaryButton) 353 | } 354 | .previewDevice("iPhone 13 Pro Max") 355 | .preferredColorScheme(.light) 356 | } 357 | } 358 | #endif 359 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Common/Views/UserImageView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SupportViews.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Yashraj jadhav on 14/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct UserImageView: View { 11 | 12 | var imageName: Image 13 | var lineWidth: CGFloat 14 | var borderColor: Color 15 | 16 | init(imageName: Image, lineWidth: CGFloat, borderColor: Color) { 17 | self.imageName = imageName 18 | self.lineWidth = lineWidth 19 | self.borderColor = borderColor 20 | } 21 | 22 | var body: some View { 23 | imageName 24 | .resizable() 25 | .aspectRatio(contentMode: .fill) 26 | .frame(width: 90.0, height: 90.0) 27 | .clipShape(Circle()) 28 | .overlay( 29 | Circle() 30 | .stroke(borderColor, lineWidth: lineWidth) 31 | ) 32 | } 33 | } 34 | 35 | //#Preview { 36 | // ImageView(imageName: Image("EX"), lineWidth: 6, borderColor: .yellow) 37 | // } 38 | 39 | 40 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Features/Main/ViewModels/MainViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MainViewModel.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 21/10/23. 6 | // 7 | 8 | import Foundation 9 | 10 | class MainViewModel: ObservableObject { 11 | 12 | // MARK: - Variables 13 | var userName: String = "" 14 | 15 | 16 | init() { 17 | // Default userName 18 | userName = "User" 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Features/Main/Views/MainView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import SwiftUI 9 | import CoreData 10 | 11 | struct MainView: View { 12 | 13 | // MARK: - Variables 14 | @StateObject var mainViewModel: MainViewModel = MainViewModel() 15 | 16 | @State var viewAppeared = false 17 | 18 | 19 | // MARK: - Views 20 | var body: some View { 21 | ZStack(alignment: Alignment(horizontal: .leading, vertical: .top)) { 22 | Color.background 23 | .edgesIgnoringSafeArea(.all) 24 | VStack(alignment: .leading) { 25 | HStack { 26 | Spacer() 27 | 28 | Text("Tracker") 29 | .font(TypefaceOne.regular.font(size: 22)) 30 | .offset(x: 28) 31 | Spacer() 32 | TodayView() 33 | } 34 | 35 | VStack(alignment: .leading) { 36 | Text("Hey \(mainViewModel.userName),") 37 | .font(TypefaceTwo.semibold.font(size: 30)) 38 | .tracking(-0.2) 39 | .offset(y: viewAppeared ? 0 : 12) 40 | .opacity(viewAppeared ? 1 : 0.3) 41 | .animation(.easeInOut(duration: 0.2).delay(0.05), value: viewAppeared) 42 | 43 | HStack { 44 | Text("How are you") 45 | .font(TypefaceTwo.semibold.font(size: 32)) 46 | .tracking(-0.2) 47 | .opacity(0.6) 48 | 49 | Text("feeling?") 50 | .font(TypefaceTwo.bold.font(size: 32)) 51 | .tracking(-0.2) 52 | } 53 | .offset(y: viewAppeared ? 0 : 12) 54 | .opacity(viewAppeared ? 1 : 0.3) 55 | .animation(.easeInOut(duration: 0.2).delay(0.05), value: viewAppeared) 56 | } 57 | } 58 | .padding(.horizontal, 24) 59 | .padding(.vertical, 8) 60 | } 61 | .onAppear() { 62 | viewAppeared = true 63 | } 64 | } 65 | 66 | } 67 | 68 | 69 | 70 | struct ContentView_Previews: PreviewProvider { 71 | static var previews: some View { 72 | MainView() 73 | .environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Features/Main/Views/Support Views/TodayView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TodayView.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 21/10/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TodayView: View { 11 | 12 | // MARK: - Variables 13 | let dateManager: DateManager = DateManager() 14 | 15 | // MARK: - Views 16 | var body: some View { 17 | VStack(spacing: 0) { 18 | Text(dateManager.getCurrentDate()) 19 | .foregroundColor(.label) 20 | .font(TypefaceOne.regular.font(size: 20)) 21 | 22 | Text(dateManager.getCurrentDay()) 23 | .foregroundColor(.label) 24 | .font(TypefaceTwo.regular.font(size: 16)) 25 | 26 | } 27 | .frame(width: 44, height: 44) 28 | .padding(6) 29 | .overlay { 30 | RoundedRectangle(cornerRadius: 8) 31 | .stroke(lineWidth: 1) 32 | } 33 | } 34 | } 35 | 36 | struct TodayView_Previews: PreviewProvider { 37 | static var previews: some View { 38 | TodayView() 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Code/Persistence.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Persistence.swift 3 | // DailyTracker_UI 4 | // 5 | // Created by Shubham Singh on 07/10/23. 6 | // 7 | 8 | import CoreData 9 | 10 | struct PersistenceController { 11 | static let shared = PersistenceController() 12 | 13 | static var preview: PersistenceController = { 14 | let result = PersistenceController(inMemory: true) 15 | let viewContext = result.container.viewContext 16 | for _ in 0..<10 { 17 | let newItem = Item(context: viewContext) 18 | newItem.timestamp = Date() 19 | } 20 | do { 21 | try viewContext.save() 22 | } catch { 23 | // Replace this implementation with code to handle the error appropriately. 24 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 25 | let nsError = error as NSError 26 | fatalError("Unresolved error \(nsError), \(nsError.userInfo)") 27 | } 28 | return result 29 | }() 30 | 31 | let container: NSPersistentContainer 32 | 33 | init(inMemory: Bool = false) { 34 | container = NSPersistentContainer(name: "DailyTracker_UI") 35 | if inMemory { 36 | container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null") 37 | } 38 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 39 | if let error = error as NSError? { 40 | // Replace this implementation with code to handle the error appropriately. 41 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 42 | 43 | /* 44 | Typical reasons for an error here include: 45 | * The parent directory does not exist, cannot be created, or disallows writing. 46 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 47 | * The device is out of space. 48 | * The store could not be migrated to the current model version. 49 | Check the error message to determine what the actual problem was. 50 | */ 51 | fatalError("Unresolved error \(error), \(error.userInfo)") 52 | } 53 | }) 54 | container.viewContext.automaticallyMergesChangesFromParent = true 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/EX.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "EX.jpeg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/EX.imageset/EX.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Assets.xcassets/EX.imageset/EX.jpeg -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Assets.xcassets/Image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/DailyTracker-UI-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIAppFonts 6 | 7 | Blight Regular.otf 8 | BungeeLayers-Regular.otf 9 | Degular-Bold.ttf 10 | Degular-Regular.ttf 11 | Degular-Medium.ttf 12 | Degular-Semibold.ttf 13 | EurostileExtendedBlack.ttf 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/DailyTracker_UI.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | DailyTracker_UI.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/DailyTracker_UI.xcdatamodeld/DailyTracker_UI.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Fonts/Bungee/BungeeLayers-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Fonts/Bungee/BungeeLayers-Regular.otf -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Bold.ttf -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Medium.ttf -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Regular.ttf -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Shubham0812/DailyTracker_UI/2119dd4203595491b7f5a5b2087befdfac62345f/DailyTracker_UI/iOS/Resources/Fonts/Degular/Degular-Semibold.ttf -------------------------------------------------------------------------------- /DailyTracker_UI/iOS/Resources/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DailyTracker_UI 2 | Daily Journal & Mood Tracker using the SwiftUI Framework 🚀 3 | 4 | [![platform](https://img.shields.io/badge/platform-iOS-orange)](https://www.android.com) 5 | [![GitHub license](https://img.shields.io/badge/License-Apache2.0-blue.svg)](LICENSE) 6 | 7 | 8 | Like the project? Just give it a star ⭐️ and spread the word! 9 | 10 | 11 | ## Who Can Contribute? 👩🏽‍💻 12 | * Anyone of all skill levels can contribute to this repo 13 | * Please ensure that you have signed up at [Hacktoberfest]([https://hacktoberfest.digitalocean.com/](https://hacktoberfest.com/participation/)) 14 | * Please check all issues that are labeled as `Hacktoberfest` 15 | * Some issues are labeled as `good-first-issue` these are great for beginners to get involved 16 | 17 | Before working on an issue please **leave a comment** and I'll assign the issue to you to prevent a clash 18 | 19 | 20 | ## Getting Started 🙌 21 | * Fork the project 22 | * Open your forked project in GitHub and click on the green <>Code button. 23 | * Copy the HTTPS or SSH link and open your Terminal / Git Bash. 24 | 25 | git clone 26 | 27 | * Run the project (to ensure everything works) 28 | * Checkout a new branch to work on an issue: 29 | 30 | git checkout -b name-of-issue-ticketNumber 31 | * Once you've finished coding / working on an Issue, you can open a new PR 32 | 33 | git add . 34 | git commit -m “Description of what was sorted” 35 | git push origin name-of-issue-ticketNumber 36 | 37 | * Open the project on GitHub and raise it to the main branch on the repo 38 | 39 | 40 | #### How to Raise a PR 41 | [Pull Request Example](https://github.com/Shubham0812/DailyTracker_UI/pull/2) 42 | 43 | 44 | ## Contributing 🤖 45 | To start contributing, please check out [Contribution.md](https://github.com/Shubham0812/DailyTracker_UI/blob/main/docs/CONTRIBUTION.md). 46 | 47 | Everyone is welcome to contribute to this project, if you’re new to programming you might want to check out issues labeled as `UI-Improvements` and `good-first-issue`. Before you assist with the development, please set up the project on your local machine, run it, and go through the application. 48 | 49 | 50 | Please read the [Architecture.md](https://github.com/Shubham0812/Color.Dev_UI/blob/main/docs/Architecture.md) to understand the flow and the structuring of the app. 51 | 52 | 53 | ## License 54 | This project is licensed under [Apache License 2.0](https://github.com/Shubham0812/HabitTracker_UI/blob/main/LICENSE). 55 | 56 | 57 | ## Credit 58 | © Shubham Kumar Singh | 2023 59 | -------------------------------------------------------------------------------- /docs/CONTRIBUTION.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributing Guidelines 3 | 4 | First off, thanks for taking the time to contribute! ❤️ 5 | 6 | 7 | And if you like the project, but just don't have time to contribute, that's fine. 8 | There are other easy ways to support the project and show your appreciation, which we would also be very happy about: 9 | > - Star the project 10 | > - Tweet about it 11 | > - Refer this project in your project's readme 12 | > - Mention the project at local meetups and tell your friends/colleagues 13 | 14 | 15 | 16 | ## General 17 | These are general guidelines when contributing to the project. These guidelines should help contributors understand which branch and how to structure these commits. 18 | 19 | ### Branch Policy 20 | 21 | | Branch name | Description. | 22 | |---|:--| 23 | | **develop** | Always checkout from the develop branch, and create your subbranch. Raise your PRs against the develop branch.| 24 | | **main** | After Reviewing merge conflicts the code will be merged into main from the develop branch. Before code can be merged into master it will go through run scripts. | 25 | | **Creating a branch** | When creating a branch include the following: a description of the task and the issue ID e.g. _add-coredata-module-1337_. Hyphens should be used to seperate words. | 26 | 27 | ------------------ 28 | 29 | ### Pull Requests 30 | When contributing to the project there are some clear guidelines to follow: 31 | 32 | **1. State the intent of the PR** 33 | 34 | > State the intent of the pull request by using a meaningful description. 35 | 36 | 37 | **2. Clearly describe what has changed** 38 | 39 | Clearly describe the changes that have been made e.g. 40 | 41 | > Refactored legacy code 42 | 43 | ❌ This does not describe what has changed, but rather sums up the ticket 44 | 45 | > Refactored View X by removing unuseful comments and added factory methods to handle... _additional detail_ 46 | 47 | ✅ This highlights the core changes and provides further detail to changes 48 | 49 | **3. Add screenshots where necessary** 50 | 51 | Sometimes front end UI changes may require screenshots. Use these at your leisure. 52 | 53 | 54 | #### Additional Points to be Kept in Mind 55 | 56 | * Debug code should not be committed. If any code has to be modified for debug or QA testing purposes, make sure it is kept in the working tree only and not committed. If any **PR** contains any such changes, it shall be **__rejected__**. 57 | 58 | * Clean the code before raising a PR. Delete any unused code or files (instead of commenting out unused code), and rename the variables to be more relevant. 59 | 60 | * While committing the code, review the changes that are going in that commit. It's better to make smaller commits for each small task and push changes only relevant to that task. 61 | 62 | 63 | --- 64 | ### Issue resolution 65 | 66 | All contributors are encouraged to add tickets where necessary. There are some boilerplate templates for bugs and features. Should you want to add a feature please run this past the project maintainers. 67 | 68 | There are two types of templates for issues: 69 | 1. Bug - an error 70 | 2. Feature - a set of functionality or enhancements 71 | 72 | ## Code Structuring 73 | 74 | > Code can only tell you __how__ the program works; comments can tell you __why__ it works. Remember that you write your code to be consumed by other programmers first. 75 | 76 | ### Code Styling 77 | > Most of the Code Styling Guidelines can be found on Kodeco's Swift Style Guide. We'll be following that extensively. 78 | 79 | > [Kodeco Swift Style Guide](https://github.com/kodecocodes/swift-style-guide) 80 | 81 | 82 | ### Comments 83 | >Your Code Comment should reflect your understanding and solution to the problem for which you are writing this code {Objective, for flow and function level} 84 | 85 | #### What needs a comment? 86 | 87 | - ViewModels 88 | - Services 89 | - Functions that perform logical operations 90 | - Models 91 | - Programmatic UI handling 92 | 93 | #### Functional comments 94 | - Add features to development process. 95 | - Four groups of functional comment 96 | - i) Diagnostic directives: 97 | - ii) Annotations: 98 | - iii) Bugfix notes: 99 | - iv) Performance improvement notes 100 | 101 | #### Explanatory comments 102 | - These comments summarize the code or to explain the programmer’s intent. 103 | - Should answer the question __Why__ instead of __What__. 104 | - Algorithm description: name, complexity, documentation 105 | - Workarounds. 106 | 107 | ### Comment Styles 108 | 109 | #### 1. Single Line 110 | `// returns the dynamic height for the cell` 111 | 112 | 113 | #### 2. Multi Line 114 | * UIKit: 115 | * For static image format, this value is always 0. 116 | * For animated image format, 0 means infinite looping. 117 | 118 | #### 3. Documentation 119 | 120 | /// Returns a random value within the specified range. 121 | /// 122 | /// Use this method to generate an integer within a specific range. 123 | func random(in range: ClosedRange) -> Int 124 | 125 | #### 4. Procedure 126 | # Lists 127 | 128 | You can apply *italic*, **bold**, or `code` inline styles. 129 | 130 | ## Unordered Lists 131 | 132 | - Lists are great, 133 | - but perhaps don't nest; 134 | - Sub-list formatting... 135 | 136 | - ...isn't the best. 137 | 138 | ## Ordered Lists 139 | 140 | 1. Ordered lists, too, 141 | 2. for things that are sorted; 142 | 3. Arabic numerals 143 | 4. are the only kind supported. 144 | -------------------------------------------------------------------------------- /docs/Contributors.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | To start contributing, review [CONTRIBUTING.md](https://github.com/Shubham0812/DailyTracker_UI/blob/main/docs/CONTRIBUTION.md). New contributors are always welcome to support this project. 3 | 4 | **Please be sure to comment on an issue you'd like to work on and [Shubham Kr. Singh](https://github.com/Shubham0812), the maintainer of this project, will assign it to you!**. 5 | 6 | Checkout any issue labeled `hacktoberfest` to start contributing. 7 | 8 | ## Issue Labels 9 | * `good-first-issue` is an issue that's beginner level 10 | * `Advance` is much more challenging than `good-first-issue` 11 | 12 | Please choose an appropriate issue for your skill level 13 | 14 | ### Contributors 15 | 16 | 17 | 18 | 19 | Made with [contrib.rocks](https://contrib.rocks). 20 | 21 | 22 | --------------------------------------------------------------------------------