├── .gitignore ├── LICENSE ├── NuemorphicClock ├── NuemorphicClock.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── NuemorphicClock │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── BgDark.colorset │ │ └── Contents.json │ ├── BgLight.colorset │ │ └── Contents.json │ ├── Contents.json │ ├── PurpleDark.colorset │ │ └── Contents.json │ └── PurpleLight.colorset │ │ └── Contents.json │ ├── Color+Extension.swift │ ├── ContentView.swift │ ├── NuemorphicClockApp.swift │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json └── README.md /.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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Pratik Gadhesariya 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3097E2F3298963120018A11F /* NuemorphicClockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3097E2F2298963120018A11F /* NuemorphicClockApp.swift */; }; 11 | 3097E2F5298963120018A11F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3097E2F4298963120018A11F /* ContentView.swift */; }; 12 | 3097E2F7298963170018A11F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3097E2F6298963170018A11F /* Assets.xcassets */; }; 13 | 3097E2FA298963170018A11F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3097E2F9298963170018A11F /* Preview Assets.xcassets */; }; 14 | 3097E301298965880018A11F /* Color+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3097E300298965880018A11F /* Color+Extension.swift */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | 3097E2EF298963120018A11F /* NuemorphicClock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NuemorphicClock.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | 3097E2F2298963120018A11F /* NuemorphicClockApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NuemorphicClockApp.swift; sourceTree = ""; }; 20 | 3097E2F4298963120018A11F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 21 | 3097E2F6298963170018A11F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | 3097E2F9298963170018A11F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 23 | 3097E300298965880018A11F /* Color+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Extension.swift"; sourceTree = ""; }; 24 | /* End PBXFileReference section */ 25 | 26 | /* Begin PBXFrameworksBuildPhase section */ 27 | 3097E2EC298963120018A11F /* Frameworks */ = { 28 | isa = PBXFrameworksBuildPhase; 29 | buildActionMask = 2147483647; 30 | files = ( 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | 3097E2E6298963120018A11F = { 38 | isa = PBXGroup; 39 | children = ( 40 | 3097E2F1298963120018A11F /* NuemorphicClock */, 41 | 3097E2F0298963120018A11F /* Products */, 42 | ); 43 | sourceTree = ""; 44 | }; 45 | 3097E2F0298963120018A11F /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 3097E2EF298963120018A11F /* NuemorphicClock.app */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | 3097E2F1298963120018A11F /* NuemorphicClock */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 3097E2F2298963120018A11F /* NuemorphicClockApp.swift */, 57 | 3097E2F4298963120018A11F /* ContentView.swift */, 58 | 3097E300298965880018A11F /* Color+Extension.swift */, 59 | 3097E2F6298963170018A11F /* Assets.xcassets */, 60 | 3097E2F8298963170018A11F /* Preview Content */, 61 | ); 62 | path = NuemorphicClock; 63 | sourceTree = ""; 64 | }; 65 | 3097E2F8298963170018A11F /* Preview Content */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 3097E2F9298963170018A11F /* Preview Assets.xcassets */, 69 | ); 70 | path = "Preview Content"; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | 3097E2EE298963120018A11F /* NuemorphicClock */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = 3097E2FD298963170018A11F /* Build configuration list for PBXNativeTarget "NuemorphicClock" */; 79 | buildPhases = ( 80 | 3097E2EB298963120018A11F /* Sources */, 81 | 3097E2EC298963120018A11F /* Frameworks */, 82 | 3097E2ED298963120018A11F /* Resources */, 83 | ); 84 | buildRules = ( 85 | ); 86 | dependencies = ( 87 | ); 88 | name = NuemorphicClock; 89 | productName = NuemorphicClock; 90 | productReference = 3097E2EF298963120018A11F /* NuemorphicClock.app */; 91 | productType = "com.apple.product-type.application"; 92 | }; 93 | /* End PBXNativeTarget section */ 94 | 95 | /* Begin PBXProject section */ 96 | 3097E2E7298963120018A11F /* Project object */ = { 97 | isa = PBXProject; 98 | attributes = { 99 | BuildIndependentTargetsInParallel = 1; 100 | LastSwiftUpdateCheck = 1340; 101 | LastUpgradeCheck = 1340; 102 | TargetAttributes = { 103 | 3097E2EE298963120018A11F = { 104 | CreatedOnToolsVersion = 13.4.1; 105 | }; 106 | }; 107 | }; 108 | buildConfigurationList = 3097E2EA298963120018A11F /* Build configuration list for PBXProject "NuemorphicClock" */; 109 | compatibilityVersion = "Xcode 13.0"; 110 | developmentRegion = en; 111 | hasScannedForEncodings = 0; 112 | knownRegions = ( 113 | en, 114 | Base, 115 | ); 116 | mainGroup = 3097E2E6298963120018A11F; 117 | productRefGroup = 3097E2F0298963120018A11F /* Products */; 118 | projectDirPath = ""; 119 | projectRoot = ""; 120 | targets = ( 121 | 3097E2EE298963120018A11F /* NuemorphicClock */, 122 | ); 123 | }; 124 | /* End PBXProject section */ 125 | 126 | /* Begin PBXResourcesBuildPhase section */ 127 | 3097E2ED298963120018A11F /* Resources */ = { 128 | isa = PBXResourcesBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | 3097E2FA298963170018A11F /* Preview Assets.xcassets in Resources */, 132 | 3097E2F7298963170018A11F /* Assets.xcassets in Resources */, 133 | ); 134 | runOnlyForDeploymentPostprocessing = 0; 135 | }; 136 | /* End PBXResourcesBuildPhase section */ 137 | 138 | /* Begin PBXSourcesBuildPhase section */ 139 | 3097E2EB298963120018A11F /* Sources */ = { 140 | isa = PBXSourcesBuildPhase; 141 | buildActionMask = 2147483647; 142 | files = ( 143 | 3097E2F5298963120018A11F /* ContentView.swift in Sources */, 144 | 3097E301298965880018A11F /* Color+Extension.swift in Sources */, 145 | 3097E2F3298963120018A11F /* NuemorphicClockApp.swift in Sources */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXSourcesBuildPhase section */ 150 | 151 | /* Begin XCBuildConfiguration section */ 152 | 3097E2FB298963170018A11F /* Debug */ = { 153 | isa = XCBuildConfiguration; 154 | buildSettings = { 155 | ALWAYS_SEARCH_USER_PATHS = NO; 156 | CLANG_ANALYZER_NONNULL = YES; 157 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 158 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 159 | CLANG_ENABLE_MODULES = YES; 160 | CLANG_ENABLE_OBJC_ARC = YES; 161 | CLANG_ENABLE_OBJC_WEAK = YES; 162 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 163 | CLANG_WARN_BOOL_CONVERSION = YES; 164 | CLANG_WARN_COMMA = YES; 165 | CLANG_WARN_CONSTANT_CONVERSION = YES; 166 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 167 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 168 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 169 | CLANG_WARN_EMPTY_BODY = YES; 170 | CLANG_WARN_ENUM_CONVERSION = YES; 171 | CLANG_WARN_INFINITE_RECURSION = YES; 172 | CLANG_WARN_INT_CONVERSION = YES; 173 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 174 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 175 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 176 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 177 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 178 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 179 | CLANG_WARN_STRICT_PROTOTYPES = YES; 180 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 181 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 182 | CLANG_WARN_UNREACHABLE_CODE = YES; 183 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 184 | COPY_PHASE_STRIP = NO; 185 | DEBUG_INFORMATION_FORMAT = dwarf; 186 | ENABLE_STRICT_OBJC_MSGSEND = YES; 187 | ENABLE_TESTABILITY = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu11; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | IPHONEOS_DEPLOYMENT_TARGET = 15.5; 203 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 204 | MTL_FAST_MATH = YES; 205 | ONLY_ACTIVE_ARCH = YES; 206 | SDKROOT = iphoneos; 207 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 208 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 209 | }; 210 | name = Debug; 211 | }; 212 | 3097E2FC298963170018A11F /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | ALWAYS_SEARCH_USER_PATHS = NO; 216 | CLANG_ANALYZER_NONNULL = YES; 217 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 218 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 219 | CLANG_ENABLE_MODULES = YES; 220 | CLANG_ENABLE_OBJC_ARC = YES; 221 | CLANG_ENABLE_OBJC_WEAK = YES; 222 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 223 | CLANG_WARN_BOOL_CONVERSION = YES; 224 | CLANG_WARN_COMMA = YES; 225 | CLANG_WARN_CONSTANT_CONVERSION = YES; 226 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 227 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 228 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 229 | CLANG_WARN_EMPTY_BODY = YES; 230 | CLANG_WARN_ENUM_CONVERSION = YES; 231 | CLANG_WARN_INFINITE_RECURSION = YES; 232 | CLANG_WARN_INT_CONVERSION = YES; 233 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 234 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 235 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 237 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 238 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 239 | CLANG_WARN_STRICT_PROTOTYPES = YES; 240 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 241 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 242 | CLANG_WARN_UNREACHABLE_CODE = YES; 243 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 244 | COPY_PHASE_STRIP = NO; 245 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 246 | ENABLE_NS_ASSERTIONS = NO; 247 | ENABLE_STRICT_OBJC_MSGSEND = YES; 248 | GCC_C_LANGUAGE_STANDARD = gnu11; 249 | GCC_NO_COMMON_BLOCKS = YES; 250 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 251 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 252 | GCC_WARN_UNDECLARED_SELECTOR = YES; 253 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 254 | GCC_WARN_UNUSED_FUNCTION = YES; 255 | GCC_WARN_UNUSED_VARIABLE = YES; 256 | IPHONEOS_DEPLOYMENT_TARGET = 15.5; 257 | MTL_ENABLE_DEBUG_INFO = NO; 258 | MTL_FAST_MATH = YES; 259 | SDKROOT = iphoneos; 260 | SWIFT_COMPILATION_MODE = wholemodule; 261 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 262 | VALIDATE_PRODUCT = YES; 263 | }; 264 | name = Release; 265 | }; 266 | 3097E2FE298963170018A11F /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 270 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 271 | CODE_SIGN_STYLE = Automatic; 272 | CURRENT_PROJECT_VERSION = 1; 273 | DEVELOPMENT_ASSET_PATHS = "\"NuemorphicClock/Preview Content\""; 274 | DEVELOPMENT_TEAM = VA3V23L23N; 275 | ENABLE_PREVIEWS = YES; 276 | GENERATE_INFOPLIST_FILE = YES; 277 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 278 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 279 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 280 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 281 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 282 | LD_RUNPATH_SEARCH_PATHS = ( 283 | "$(inherited)", 284 | "@executable_path/Frameworks", 285 | ); 286 | MARKETING_VERSION = 1.0; 287 | PRODUCT_BUNDLE_IDENTIFIER = com.pratik.NuemorphicClock; 288 | PRODUCT_NAME = "$(TARGET_NAME)"; 289 | SWIFT_EMIT_LOC_STRINGS = YES; 290 | SWIFT_VERSION = 5.0; 291 | TARGETED_DEVICE_FAMILY = "1,2"; 292 | }; 293 | name = Debug; 294 | }; 295 | 3097E2FF298963170018A11F /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_STYLE = Automatic; 301 | CURRENT_PROJECT_VERSION = 1; 302 | DEVELOPMENT_ASSET_PATHS = "\"NuemorphicClock/Preview Content\""; 303 | DEVELOPMENT_TEAM = VA3V23L23N; 304 | ENABLE_PREVIEWS = YES; 305 | GENERATE_INFOPLIST_FILE = YES; 306 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 307 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 308 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 309 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 310 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 311 | LD_RUNPATH_SEARCH_PATHS = ( 312 | "$(inherited)", 313 | "@executable_path/Frameworks", 314 | ); 315 | MARKETING_VERSION = 1.0; 316 | PRODUCT_BUNDLE_IDENTIFIER = com.pratik.NuemorphicClock; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | SWIFT_EMIT_LOC_STRINGS = YES; 319 | SWIFT_VERSION = 5.0; 320 | TARGETED_DEVICE_FAMILY = "1,2"; 321 | }; 322 | name = Release; 323 | }; 324 | /* End XCBuildConfiguration section */ 325 | 326 | /* Begin XCConfigurationList section */ 327 | 3097E2EA298963120018A11F /* Build configuration list for PBXProject "NuemorphicClock" */ = { 328 | isa = XCConfigurationList; 329 | buildConfigurations = ( 330 | 3097E2FB298963170018A11F /* Debug */, 331 | 3097E2FC298963170018A11F /* Release */, 332 | ); 333 | defaultConfigurationIsVisible = 0; 334 | defaultConfigurationName = Release; 335 | }; 336 | 3097E2FD298963170018A11F /* Build configuration list for PBXNativeTarget "NuemorphicClock" */ = { 337 | isa = XCConfigurationList; 338 | buildConfigurations = ( 339 | 3097E2FE298963170018A11F /* Debug */, 340 | 3097E2FF298963170018A11F /* Release */, 341 | ); 342 | defaultConfigurationIsVisible = 0; 343 | defaultConfigurationName = Release; 344 | }; 345 | /* End XCConfigurationList section */ 346 | }; 347 | rootObject = 3097E2E7298963120018A11F /* Project object */; 348 | } 349 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/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 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/BgDark.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "extended-gray", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "white" : "0.057" 9 | } 10 | }, 11 | "idiom" : "universal" 12 | }, 13 | { 14 | "appearances" : [ 15 | { 16 | "appearance" : "luminosity", 17 | "value" : "dark" 18 | } 19 | ], 20 | "color" : { 21 | "color-space" : "extended-gray", 22 | "components" : { 23 | "alpha" : "1.000", 24 | "white" : "0.057" 25 | } 26 | }, 27 | "idiom" : "universal" 28 | } 29 | ], 30 | "info" : { 31 | "author" : "xcode", 32 | "version" : 1 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/BgLight.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.522", 9 | "green" : "0.522", 10 | "red" : "0.522" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.522", 27 | "green" : "0.522", 28 | "red" : "0.522" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/PurpleDark.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.969", 9 | "green" : "0.522", 10 | "red" : "0.690" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.969", 27 | "green" : "0.522", 28 | "red" : "0.690" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Assets.xcassets/PurpleLight.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.973", 9 | "green" : "0.557", 10 | "red" : "0.725" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.973", 27 | "green" : "0.557", 28 | "red" : "0.725" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Color+Extension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Color+Extension.swift 3 | // NuemorphicClock 4 | // 5 | // Created by Pratik on 31/01/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension Color { 11 | static let bgLight = Color("BgLight") 12 | static let bgDark = Color("BgDark") 13 | static let purpleLight = Color("PurpleLight") 14 | static let purpleDark = Color("PurpleDark") 15 | } 16 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // NuemorphicClock 4 | // 5 | // Created by Pratik on 31/01/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | let timer = Timer.publish(every: 1, on: .main, in: .default).autoconnect() 13 | @State private var secondAngle: Double = 0 14 | @State private var minuteAngle: Double = 0 15 | @State private var hourAngle: Double = 0 16 | 17 | private let fullCircleValue: Double = 0.2 18 | //value = 60 will give you real clock experience 19 | 20 | var body: some View { 21 | ZStack { 22 | LinearGradient(colors: [.bgLight, .bgDark], 23 | startPoint: .top, 24 | endPoint: .bottom) 25 | .ignoresSafeArea() 26 | 27 | 28 | VStack { 29 | VStack(spacing: 0) { 30 | Text("Jan") 31 | .textCase(.uppercase) 32 | .font(.system(size: 13, weight: .medium, design: .monospaced)) 33 | .frame(maxWidth: .infinity, alignment: .trailing) 34 | .foregroundColor(.bgDark.opacity(0.6)) 35 | 36 | Text("31") 37 | .font(.system(size: 34, weight: .medium, design: .monospaced)) 38 | .foregroundColor(.white) 39 | 40 | } 41 | Spacer() 42 | } 43 | .frame(width: 80) 44 | .padding(.vertical, 70) 45 | clockView 46 | 47 | } 48 | .onReceive(timer) { t in 49 | withAnimation(.linear(duration: 1)) { 50 | secondAngle += 360 / fullCircleValue 51 | minuteAngle += 360 / (fullCircleValue*60) 52 | hourAngle += 360 / (fullCircleValue*60*12) 53 | } 54 | } 55 | } 56 | 57 | private var clockView: some View { 58 | ZStack { 59 | Circle() 60 | .stroke(lineWidth: 20) 61 | .fill(LinearGradient(colors: [.bgLight, .bgDark], 62 | startPoint: .top, 63 | endPoint: .bottom)) 64 | .blur(radius: 16) 65 | .shadow(color: .bgLight, radius: 23, x: 0, y: -25) 66 | .shadow(color: .bgDark, radius: 23, x: 0, y: 25) 67 | .frame(width: 330, height: 330, alignment: .center) 68 | 69 | Circle() 70 | .fill(LinearGradient(colors: [.bgDark, .bgLight].reversed(), 71 | startPoint: .top, 72 | endPoint: .bottom)) 73 | .blur(radius: 3) 74 | .shadow(color: .bgLight, radius: 3, x: 0, y: -3) 75 | .shadow(color: .bgDark, radius: 3, x: 0, y: 3) 76 | .frame(width: 13, height: 13, alignment: .center) 77 | 78 | // handsView 79 | newHandsView 80 | .shadow(color: .bgDark, radius: 10, x: 7, y: 10) 81 | 82 | } 83 | } 84 | 85 | private var handsView: some View { 86 | ZStack { 87 | hourHand 88 | 89 | minuteHand 90 | 91 | // secondHand 92 | } 93 | .rotationEffect(.degrees(-90)) 94 | } 95 | 96 | private var newHandsView: some View { 97 | Canvas { context, size in 98 | context.addFilter(.alphaThreshold(min: 0.5, color: .purpleLight)) 99 | context.addFilter(.blur(radius: 2)) 100 | 101 | context.drawLayer { ctx in 102 | let hour = ctx.resolveSymbol(id: 1)! 103 | let minute = ctx.resolveSymbol(id: 2)! 104 | 105 | ctx.draw(hour, at: CGPoint(x: size.width/2, y: size.height/2)) 106 | ctx.draw(minute, at: CGPoint(x: size.width/2, y: size.height/2)) 107 | } 108 | } symbols: { 109 | hourHand 110 | .rotationEffect(.degrees(-90)) 111 | .tag(1) 112 | 113 | minuteHand 114 | .rotationEffect(.degrees(-90)) 115 | .tag(2) 116 | } 117 | 118 | } 119 | 120 | private var hourHand: some View { 121 | Capsule(style: .continuous) 122 | .fill(LinearGradient(colors: [.purpleDark, .purpleLight], startPoint: .leading, endPoint: .trailing)) 123 | .frame(width: 60, height: 13, alignment: .center) 124 | .offset(x: 50) 125 | .rotationEffect(.degrees(hourAngle)) 126 | // .shadow(color: .bgDark, radius: 10, x: -7, y: 5) 127 | } 128 | 129 | private var minuteHand: some View { 130 | Capsule(style: .continuous) 131 | .fill(LinearGradient(colors: [.purpleDark, .purpleLight], startPoint: .leading, endPoint: .trailing)) 132 | .frame(width: 70, height: 7, alignment: .center) 133 | .offset(x: 55) 134 | .rotationEffect(.degrees(minuteAngle)) 135 | // .shadow(color: .bgDark, radius: 10, x: -7, y: 5) 136 | } 137 | 138 | private var secondHand: some View { 139 | Capsule(style: .continuous) 140 | .fill(LinearGradient(colors: [.purpleDark, .purpleLight], startPoint: .leading, endPoint: .trailing)) 141 | .frame(width: 80, height: 4, alignment: .center) 142 | .offset(x: 60) 143 | .rotationEffect(.degrees(secondAngle)) 144 | .shadow(color: .bgDark, radius: 5, x: -5, y: 5) 145 | } 146 | } 147 | 148 | struct ContentView_Previews: PreviewProvider { 149 | static var previews: some View { 150 | ContentView() 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/NuemorphicClockApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NuemorphicClockApp.swift 3 | // NuemorphicClock 4 | // 5 | // Created by Pratik on 31/01/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct NuemorphicClockApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /NuemorphicClock/NuemorphicClock/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nuemorphic-Clock-UI 2 | Created nice Nuemorphic Clock UI in SwiftUI. 3 | Neumorphism is not a rocket science but it is only right combination of Shadows and colors. 4 | --------------------------------------------------------------------------------