├── .DS_Store ├── ClockPicker.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ └── ringo.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── ringo.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Example ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── clockicon-1024.png │ │ ├── clockicon-20.png │ │ ├── clockicon-20@2x.png │ │ ├── clockicon-20@3x.png │ │ ├── clockicon-29.png │ │ ├── clockicon-29@2x.png │ │ ├── clockicon-29@3x.png │ │ ├── clockicon-40.png │ │ ├── clockicon-40@2x.png │ │ ├── clockicon-40@3x.png │ │ ├── clockicon-60@2x.png │ │ ├── clockicon-60@3x.png │ │ ├── clockicon-76.png │ │ ├── clockicon-76@2x.png │ │ └── clockicon-83.5@2x.png │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── ClockPicker.entitlements ├── ContentView.swift ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── SceneDelegate.swift ├── Images ├── picture1.png ├── picture2.png ├── picture3.png ├── picture4.png └── picture5.png ├── License.txt └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/.DS_Store -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C7029547238207C9003742F4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7029546238207C9003742F4 /* AppDelegate.swift */; }; 11 | C7029549238207C9003742F4 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7029548238207C9003742F4 /* SceneDelegate.swift */; }; 12 | C702954D238207C9003742F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C702954C238207C9003742F4 /* Assets.xcassets */; }; 13 | C7029550238207C9003742F4 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C702954F238207C9003742F4 /* Preview Assets.xcassets */; }; 14 | C7029553238207C9003742F4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C7029551238207C9003742F4 /* LaunchScreen.storyboard */; }; 15 | C70AEA9723866224007D9C64 /* picture3.png in Resources */ = {isa = PBXBuildFile; fileRef = C70AEA9623866224007D9C64 /* picture3.png */; }; 16 | C746EF5123838DE000696342 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C746EF5023838DE000696342 /* ContentView.swift */; }; 17 | C7BD503F23EAB42E000886FC /* ClockTimePicker in Frameworks */ = {isa = PBXBuildFile; productRef = C7BD503E23EAB42E000886FC /* ClockTimePicker */; }; 18 | C7CEA5712388DF070044EA8B /* picture4.png in Resources */ = {isa = PBXBuildFile; fileRef = C7CEA56F2388DF060044EA8B /* picture4.png */; }; 19 | C7CEA5722388DF070044EA8B /* picture5.png in Resources */ = {isa = PBXBuildFile; fileRef = C7CEA5702388DF070044EA8B /* picture5.png */; }; 20 | C7E544862384B9DF00D0602A /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = C7E544852384B9DF00D0602A /* README.md */; }; 21 | C7E544882384BCD200D0602A /* picture1.png in Resources */ = {isa = PBXBuildFile; fileRef = C7E544872384BCD100D0602A /* picture1.png */; }; 22 | C7E5448A2384BE6F00D0602A /* License.txt in Resources */ = {isa = PBXBuildFile; fileRef = C7E544892384BE6F00D0602A /* License.txt */; }; 23 | C7E59C8D2386054000434B06 /* picture2.png in Resources */ = {isa = PBXBuildFile; fileRef = C7E59C8C2386054000434B06 /* picture2.png */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | C7029543238207C9003742F4 /* ClockPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ClockPicker.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | C7029546238207C9003742F4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 29 | C7029548238207C9003742F4 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 30 | C702954C238207C9003742F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 31 | C702954F238207C9003742F4 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 32 | C7029552238207C9003742F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 33 | C7029554238207C9003742F4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | C70AEA9623866224007D9C64 /* picture3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = picture3.png; sourceTree = ""; }; 35 | C746EF5023838DE000696342 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 36 | C7A09E5D238208B000B4B4B5 /* ClockPicker.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ClockPicker.entitlements; sourceTree = ""; }; 37 | C7CEA56F2388DF060044EA8B /* picture4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = picture4.png; sourceTree = ""; }; 38 | C7CEA5702388DF070044EA8B /* picture5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = picture5.png; sourceTree = ""; }; 39 | C7E544852384B9DF00D0602A /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 40 | C7E544872384BCD100D0602A /* picture1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = picture1.png; sourceTree = ""; }; 41 | C7E544892384BE6F00D0602A /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = ""; }; 42 | C7E59C8C2386054000434B06 /* picture2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = picture2.png; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | C7029540238207C9003742F4 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | C7BD503F23EAB42E000886FC /* ClockTimePicker in Frameworks */, 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | /* End PBXFrameworksBuildPhase section */ 55 | 56 | /* Begin PBXGroup section */ 57 | C702953A238207C9003742F4 = { 58 | isa = PBXGroup; 59 | children = ( 60 | C7F4ECBB23EA4325009ED9A1 /* Images */, 61 | C7E544892384BE6F00D0602A /* License.txt */, 62 | C7E544852384B9DF00D0602A /* README.md */, 63 | C7029545238207C9003742F4 /* Example */, 64 | C7029544238207C9003742F4 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | C7029544238207C9003742F4 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | C7029543238207C9003742F4 /* ClockPicker.app */, 72 | ); 73 | name = Products; 74 | sourceTree = ""; 75 | }; 76 | C7029545238207C9003742F4 /* Example */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | C746EF5023838DE000696342 /* ContentView.swift */, 80 | C7A09E5D238208B000B4B4B5 /* ClockPicker.entitlements */, 81 | C7029546238207C9003742F4 /* AppDelegate.swift */, 82 | C7029548238207C9003742F4 /* SceneDelegate.swift */, 83 | C702954C238207C9003742F4 /* Assets.xcassets */, 84 | C7029551238207C9003742F4 /* LaunchScreen.storyboard */, 85 | C7029554238207C9003742F4 /* Info.plist */, 86 | C702954E238207C9003742F4 /* Preview Content */, 87 | ); 88 | path = Example; 89 | sourceTree = ""; 90 | }; 91 | C702954E238207C9003742F4 /* Preview Content */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | C702954F238207C9003742F4 /* Preview Assets.xcassets */, 95 | ); 96 | path = "Preview Content"; 97 | sourceTree = ""; 98 | }; 99 | C7F4ECBB23EA4325009ED9A1 /* Images */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | C7E544872384BCD100D0602A /* picture1.png */, 103 | C7CEA56F2388DF060044EA8B /* picture4.png */, 104 | C7CEA5702388DF070044EA8B /* picture5.png */, 105 | C70AEA9623866224007D9C64 /* picture3.png */, 106 | C7E59C8C2386054000434B06 /* picture2.png */, 107 | ); 108 | path = Images; 109 | sourceTree = ""; 110 | }; 111 | /* End PBXGroup section */ 112 | 113 | /* Begin PBXNativeTarget section */ 114 | C7029542238207C9003742F4 /* ClockPicker */ = { 115 | isa = PBXNativeTarget; 116 | buildConfigurationList = C7029557238207C9003742F4 /* Build configuration list for PBXNativeTarget "ClockPicker" */; 117 | buildPhases = ( 118 | C702953F238207C9003742F4 /* Sources */, 119 | C7029540238207C9003742F4 /* Frameworks */, 120 | C7029541238207C9003742F4 /* Resources */, 121 | ); 122 | buildRules = ( 123 | ); 124 | dependencies = ( 125 | ); 126 | name = ClockPicker; 127 | packageProductDependencies = ( 128 | C7BD503E23EAB42E000886FC /* ClockTimePicker */, 129 | ); 130 | productName = ClockPicker; 131 | productReference = C7029543238207C9003742F4 /* ClockPicker.app */; 132 | productType = "com.apple.product-type.application"; 133 | }; 134 | /* End PBXNativeTarget section */ 135 | 136 | /* Begin PBXProject section */ 137 | C702953B238207C9003742F4 /* Project object */ = { 138 | isa = PBXProject; 139 | attributes = { 140 | LastSwiftUpdateCheck = 1130; 141 | LastUpgradeCheck = 1130; 142 | ORGANIZATIONNAME = "Ringo Wathelet"; 143 | TargetAttributes = { 144 | C7029542238207C9003742F4 = { 145 | CreatedOnToolsVersion = 11.3; 146 | }; 147 | }; 148 | }; 149 | buildConfigurationList = C702953E238207C9003742F4 /* Build configuration list for PBXProject "ClockPicker" */; 150 | compatibilityVersion = "Xcode 9.3"; 151 | developmentRegion = en; 152 | hasScannedForEncodings = 0; 153 | knownRegions = ( 154 | en, 155 | Base, 156 | ); 157 | mainGroup = C702953A238207C9003742F4; 158 | packageReferences = ( 159 | C7BD503D23EAB42E000886FC /* XCRemoteSwiftPackageReference "ClockTimePicker" */, 160 | ); 161 | productRefGroup = C7029544238207C9003742F4 /* Products */; 162 | projectDirPath = ""; 163 | projectRoot = ""; 164 | targets = ( 165 | C7029542238207C9003742F4 /* ClockPicker */, 166 | ); 167 | }; 168 | /* End PBXProject section */ 169 | 170 | /* Begin PBXResourcesBuildPhase section */ 171 | C7029541238207C9003742F4 /* Resources */ = { 172 | isa = PBXResourcesBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | C7029553238207C9003742F4 /* LaunchScreen.storyboard in Resources */, 176 | C7029550238207C9003742F4 /* Preview Assets.xcassets in Resources */, 177 | C7E5448A2384BE6F00D0602A /* License.txt in Resources */, 178 | C7E59C8D2386054000434B06 /* picture2.png in Resources */, 179 | C7CEA5722388DF070044EA8B /* picture5.png in Resources */, 180 | C7CEA5712388DF070044EA8B /* picture4.png in Resources */, 181 | C7E544862384B9DF00D0602A /* README.md in Resources */, 182 | C702954D238207C9003742F4 /* Assets.xcassets in Resources */, 183 | C70AEA9723866224007D9C64 /* picture3.png in Resources */, 184 | C7E544882384BCD200D0602A /* picture1.png in Resources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXResourcesBuildPhase section */ 189 | 190 | /* Begin PBXSourcesBuildPhase section */ 191 | C702953F238207C9003742F4 /* Sources */ = { 192 | isa = PBXSourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | C7029547238207C9003742F4 /* AppDelegate.swift in Sources */, 196 | C746EF5123838DE000696342 /* ContentView.swift in Sources */, 197 | C7029549238207C9003742F4 /* SceneDelegate.swift in Sources */, 198 | ); 199 | runOnlyForDeploymentPostprocessing = 0; 200 | }; 201 | /* End PBXSourcesBuildPhase section */ 202 | 203 | /* Begin PBXVariantGroup section */ 204 | C7029551238207C9003742F4 /* LaunchScreen.storyboard */ = { 205 | isa = PBXVariantGroup; 206 | children = ( 207 | C7029552238207C9003742F4 /* Base */, 208 | ); 209 | name = LaunchScreen.storyboard; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXVariantGroup section */ 213 | 214 | /* Begin XCBuildConfiguration section */ 215 | C7029555238207C9003742F4 /* Debug */ = { 216 | isa = XCBuildConfiguration; 217 | buildSettings = { 218 | ALWAYS_SEARCH_USER_PATHS = NO; 219 | CLANG_ANALYZER_NONNULL = YES; 220 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 222 | CLANG_CXX_LIBRARY = "libc++"; 223 | CLANG_ENABLE_MODULES = YES; 224 | CLANG_ENABLE_OBJC_ARC = YES; 225 | CLANG_ENABLE_OBJC_WEAK = YES; 226 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 227 | CLANG_WARN_BOOL_CONVERSION = YES; 228 | CLANG_WARN_COMMA = YES; 229 | CLANG_WARN_CONSTANT_CONVERSION = YES; 230 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 231 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 232 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 233 | CLANG_WARN_EMPTY_BODY = YES; 234 | CLANG_WARN_ENUM_CONVERSION = YES; 235 | CLANG_WARN_INFINITE_RECURSION = YES; 236 | CLANG_WARN_INT_CONVERSION = YES; 237 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 239 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 240 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 241 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 242 | CLANG_WARN_STRICT_PROTOTYPES = YES; 243 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 244 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 245 | CLANG_WARN_UNREACHABLE_CODE = YES; 246 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 247 | COPY_PHASE_STRIP = NO; 248 | DEBUG_INFORMATION_FORMAT = dwarf; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | ENABLE_TESTABILITY = YES; 251 | GCC_C_LANGUAGE_STANDARD = gnu11; 252 | GCC_DYNAMIC_NO_PIC = NO; 253 | GCC_NO_COMMON_BLOCKS = YES; 254 | GCC_OPTIMIZATION_LEVEL = 0; 255 | GCC_PREPROCESSOR_DEFINITIONS = ( 256 | "DEBUG=1", 257 | "$(inherited)", 258 | ); 259 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 261 | GCC_WARN_UNDECLARED_SELECTOR = YES; 262 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 263 | GCC_WARN_UNUSED_FUNCTION = YES; 264 | GCC_WARN_UNUSED_VARIABLE = YES; 265 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 266 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 267 | MTL_FAST_MATH = YES; 268 | ONLY_ACTIVE_ARCH = YES; 269 | SDKROOT = iphoneos; 270 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 271 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 272 | }; 273 | name = Debug; 274 | }; 275 | C7029556238207C9003742F4 /* Release */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_ANALYZER_NONNULL = YES; 280 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_ENABLE_OBJC_WEAK = YES; 286 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 287 | CLANG_WARN_BOOL_CONVERSION = YES; 288 | CLANG_WARN_COMMA = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 292 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 293 | CLANG_WARN_EMPTY_BODY = YES; 294 | CLANG_WARN_ENUM_CONVERSION = YES; 295 | CLANG_WARN_INFINITE_RECURSION = YES; 296 | CLANG_WARN_INT_CONVERSION = YES; 297 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 298 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 299 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 302 | CLANG_WARN_STRICT_PROTOTYPES = YES; 303 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 304 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 305 | CLANG_WARN_UNREACHABLE_CODE = YES; 306 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 307 | COPY_PHASE_STRIP = NO; 308 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 309 | ENABLE_NS_ASSERTIONS = NO; 310 | ENABLE_STRICT_OBJC_MSGSEND = YES; 311 | GCC_C_LANGUAGE_STANDARD = gnu11; 312 | GCC_NO_COMMON_BLOCKS = YES; 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 315 | GCC_WARN_UNDECLARED_SELECTOR = YES; 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 317 | GCC_WARN_UNUSED_FUNCTION = YES; 318 | GCC_WARN_UNUSED_VARIABLE = YES; 319 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 320 | MTL_ENABLE_DEBUG_INFO = NO; 321 | MTL_FAST_MATH = YES; 322 | SDKROOT = iphoneos; 323 | SWIFT_COMPILATION_MODE = wholemodule; 324 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 325 | VALIDATE_PRODUCT = YES; 326 | }; 327 | name = Release; 328 | }; 329 | C7029558238207C9003742F4 /* Debug */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 333 | CODE_SIGN_ENTITLEMENTS = Example/ClockPicker.entitlements; 334 | CODE_SIGN_STYLE = Automatic; 335 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 336 | DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; 337 | DEVELOPMENT_TEAM = N7KF5K7NET; 338 | ENABLE_PREVIEWS = YES; 339 | INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist"; 340 | LD_RUNPATH_SEARCH_PATHS = ( 341 | "$(inherited)", 342 | "@executable_path/Frameworks", 343 | ); 344 | PRODUCT_BUNDLE_IDENTIFIER = ringo.com.ClockPicker; 345 | PRODUCT_NAME = "$(TARGET_NAME)"; 346 | SUPPORTS_MACCATALYST = YES; 347 | SWIFT_VERSION = 5.0; 348 | TARGETED_DEVICE_FAMILY = "1,2"; 349 | }; 350 | name = Debug; 351 | }; 352 | C7029559238207C9003742F4 /* Release */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | CODE_SIGN_ENTITLEMENTS = Example/ClockPicker.entitlements; 357 | CODE_SIGN_STYLE = Automatic; 358 | DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = YES; 359 | DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\""; 360 | DEVELOPMENT_TEAM = N7KF5K7NET; 361 | ENABLE_PREVIEWS = YES; 362 | INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist"; 363 | LD_RUNPATH_SEARCH_PATHS = ( 364 | "$(inherited)", 365 | "@executable_path/Frameworks", 366 | ); 367 | PRODUCT_BUNDLE_IDENTIFIER = ringo.com.ClockPicker; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | SUPPORTS_MACCATALYST = YES; 370 | SWIFT_VERSION = 5.0; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Release; 374 | }; 375 | /* End XCBuildConfiguration section */ 376 | 377 | /* Begin XCConfigurationList section */ 378 | C702953E238207C9003742F4 /* Build configuration list for PBXProject "ClockPicker" */ = { 379 | isa = XCConfigurationList; 380 | buildConfigurations = ( 381 | C7029555238207C9003742F4 /* Debug */, 382 | C7029556238207C9003742F4 /* Release */, 383 | ); 384 | defaultConfigurationIsVisible = 0; 385 | defaultConfigurationName = Release; 386 | }; 387 | C7029557238207C9003742F4 /* Build configuration list for PBXNativeTarget "ClockPicker" */ = { 388 | isa = XCConfigurationList; 389 | buildConfigurations = ( 390 | C7029558238207C9003742F4 /* Debug */, 391 | C7029559238207C9003742F4 /* Release */, 392 | ); 393 | defaultConfigurationIsVisible = 0; 394 | defaultConfigurationName = Release; 395 | }; 396 | /* End XCConfigurationList section */ 397 | 398 | /* Begin XCRemoteSwiftPackageReference section */ 399 | C7BD503D23EAB42E000886FC /* XCRemoteSwiftPackageReference "ClockTimePicker" */ = { 400 | isa = XCRemoteSwiftPackageReference; 401 | repositoryURL = "https://github.com/workingDog/ClockTimePicker.git"; 402 | requirement = { 403 | kind = upToNextMajorVersion; 404 | minimumVersion = 1.0.3; 405 | }; 406 | }; 407 | /* End XCRemoteSwiftPackageReference section */ 408 | 409 | /* Begin XCSwiftPackageProductDependency section */ 410 | C7BD503E23EAB42E000886FC /* ClockTimePicker */ = { 411 | isa = XCSwiftPackageProductDependency; 412 | package = C7BD503D23EAB42E000886FC /* XCRemoteSwiftPackageReference "ClockTimePicker" */; 413 | productName = ClockTimePicker; 414 | }; 415 | /* End XCSwiftPackageProductDependency section */ 416 | }; 417 | rootObject = C702953B238207C9003742F4 /* Project object */; 418 | } 419 | -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "ClockTimePicker", 6 | "repositoryURL": "https://github.com/workingDog/ClockTimePicker.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "ae52aa5a2ba15436049faec86d45c9de03294581", 10 | "version": "1.0.3" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/project.xcworkspace/xcuserdata/ringo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/ClockPicker.xcodeproj/project.xcworkspace/xcuserdata/ringo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ClockPicker.xcodeproj/xcuserdata/ringo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ClockPicker.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ClockPicker 4 | // 5 | // Created by Ringo Wathelet on 2019/11/18. 6 | // Copyright © 2019 Ringo Wathelet. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "clockicon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "clockicon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "clockicon-29@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "clockicon-29@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "clockicon-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "clockicon-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "clockicon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "clockicon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "20x20", 53 | "idiom" : "ipad", 54 | "filename" : "clockicon-20.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "clockicon-20@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "clockicon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "clockicon-29@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "clockicon-40.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "clockicon-40@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "clockicon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "clockicon-76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "clockicon-83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "clockicon-1024.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-1024.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-20.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-20@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-20@3x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-29.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-29@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-29@3x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-40.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-40@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-40@3x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-60@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-60@3x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-76.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-76@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/AppIcon.appiconset/clockicon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Example/Assets.xcassets/AppIcon.appiconset/clockicon-83.5@2x.png -------------------------------------------------------------------------------- /Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Example/ClockPicker.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // ClockPicker 4 | // 5 | // Created by Ringo Wathelet on 2019/11/19. 6 | // Copyright © 2019 Ringo Wathelet. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import ClockTimePicker 11 | 12 | struct ContentView: View { 13 | 14 | @State var date = Date() 15 | @State var showTime = false 16 | @ObservedObject var options = ClockLooks() 17 | 18 | // var body: some View { 19 | // NavigationView { 20 | // NavigationLink(destination: ClockPickerView(date: self.$date, options: self.options)) { 21 | // VStack { 22 | // Text("Show time") 23 | // Text(self.getDateString()) 24 | // } 25 | // } 26 | // }.navigationViewStyle(StackNavigationViewStyle()) 27 | // .onAppear(perform: loadOptions) 28 | // } 29 | 30 | var body: some View { 31 | Group { 32 | Button(action: {self.showTime.toggle()} ) { 33 | VStack { 34 | Text("Show time") 35 | Text(self.getDateString()) 36 | } 37 | } 38 | }.sheet(isPresented: self.$showTime) { 39 | ClockPickerView(date: self.$date, options: self.options) 40 | } 41 | .onAppear(perform: loadOptions) 42 | } 43 | 44 | func loadOptions() { 45 | 46 | // for no hands must adjust some sizes and colors 47 | // options.withHands = false 48 | // options.minuteDotMarkSize = CGFloat(30) 49 | // options.minuteDotMarkColor = .orange 50 | // options.hourDotMarkSize = CGFloat(46) 51 | // options.hourDotMarkColor = .blue 52 | 53 | // for clock with hands 54 | options.backgroundColor = .yellow 55 | options.hourTickMarkColor = .blue 56 | options.hourTickMarkWidth = CGFloat(10) 57 | options.hourDotMarkSize = CGFloat(46) 58 | options.hourDotMarkColor = .blue 59 | options.hourHandColor = .blue 60 | options.minuteHandColor = .blue 61 | options.labelColor = .black 62 | options.labelFont = Font.custom("Didot-Bold", size: 30) 63 | options.circleWidth = CGFloat(2) 64 | options.hourHandleColor = .blue 65 | options.minuteHandleColor = .blue 66 | options.centerBackgroundColor = .blue 67 | options.centerTextFont = Font.custom("Helvetica", size: 20) 68 | options.hourHandWidth = CGFloat(10) 69 | options.minuteHandWidth = CGFloat(8) 70 | options.handleSize = CGFloat(35) 71 | options.ampmTintColor = UIColor.blue 72 | options.impactFeedbackOn = true 73 | 74 | } 75 | 76 | func getDateString() -> String { 77 | let formatter = DateFormatter() 78 | formatter.dateFormat = "yyyy-MM-dd h:mm a " 79 | formatter.amSymbol = "AM" 80 | formatter.pmSymbol = "PM" 81 | return formatter.string(from: date) 82 | } 83 | 84 | } 85 | 86 | struct ContentView_Previews: PreviewProvider { 87 | static var previews: some View { 88 | ContentView(date: Date()) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSApplicationCategoryType 22 | public.app-category.developer-tools 23 | LSRequiresIPhoneOS 24 | 25 | UIApplicationSceneManifest 26 | 27 | UIApplicationSupportsMultipleScenes 28 | 29 | UISceneConfigurations 30 | 31 | UIWindowSceneSessionRoleApplication 32 | 33 | 34 | UISceneConfigurationName 35 | Default Configuration 36 | UISceneDelegateClassName 37 | $(PRODUCT_MODULE_NAME).SceneDelegate 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | UIInterfaceOrientationLandscapeLeft 52 | UIInterfaceOrientationLandscapeRight 53 | 54 | UISupportedInterfaceOrientations~ipad 55 | 56 | UIInterfaceOrientationPortrait 57 | UIInterfaceOrientationPortraitUpsideDown 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | 61 | com.apple.developer.applesignin 62 | 63 | Default 64 | 65 | com.apple.security.app-sandbox 66 | 67 | com.apple.security.user-preference-write 68 | 69 | com.apple.security.network.client 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /Example/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // ClockPicker 4 | // 5 | // Created by Ringo Wathelet on 2019/11/18. 6 | // Copyright © 2019 Ringo Wathelet. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 21 | 22 | // Create the SwiftUI view that provides the window contents. 23 | let contentView = ContentView() 24 | 25 | // Use a UIHostingController as window root view controller. 26 | if let windowScene = scene as? UIWindowScene { 27 | let window = UIWindow(windowScene: windowScene) 28 | window.rootViewController = UIHostingController(rootView: contentView) 29 | self.window = window 30 | window.makeKeyAndVisible() 31 | } 32 | } 33 | 34 | func sceneDidDisconnect(_ scene: UIScene) { 35 | // Called as the scene is being released by the system. 36 | // This occurs shortly after the scene enters the background, or when its session is discarded. 37 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 38 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 39 | } 40 | 41 | func sceneDidBecomeActive(_ scene: UIScene) { 42 | // Called when the scene has moved from an inactive state to an active state. 43 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 44 | } 45 | 46 | func sceneWillResignActive(_ scene: UIScene) { 47 | // Called when the scene will move from an active state to an inactive state. 48 | // This may occur due to temporary interruptions (ex. an incoming phone call). 49 | } 50 | 51 | func sceneWillEnterForeground(_ scene: UIScene) { 52 | // Called as the scene transitions from the background to the foreground. 53 | // Use this method to undo the changes made on entering the background. 54 | } 55 | 56 | func sceneDidEnterBackground(_ scene: UIScene) { 57 | // Called as the scene transitions from the foreground to the background. 58 | // Use this method to save data, release shared resources, and store enough scene-specific state information 59 | // to restore the scene back to its current state. 60 | } 61 | 62 | 63 | } 64 | 65 | -------------------------------------------------------------------------------- /Images/picture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Images/picture1.png -------------------------------------------------------------------------------- /Images/picture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Images/picture2.png -------------------------------------------------------------------------------- /Images/picture3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Images/picture3.png -------------------------------------------------------------------------------- /Images/picture4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Images/picture4.png -------------------------------------------------------------------------------- /Images/picture5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/workingDog/ClockPicker/812b440064938710a68ef3d36607c454ec1c1695/Images/picture5.png -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2019 Ringo Wathelet 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # SwiftUI Clock Time Picker example 3 | 4 |

5 | 6 | 7 | 8 | 9 |

10 | 11 | An exampe of using [**ClockTimePicker**](https://github.com/workingDog/ClockTimePicker) library. 12 | 13 | ## Clock with hands 14 | 15 | [**ClockTimePicker**](https://github.com/workingDog/ClockTimePicker) is a SwiftUI view that displays a clock with the hour and minutes hands. 16 | These hands can be dragged around the clock face to select the desired hour and minutes of your date. 17 | 18 | See **ContenView.swift** for how to use it in your code. 19 | 20 | The main element is **ClockPickerView.swift**. 21 | 22 | Use it like a *DatePicker*, such as: 23 | 24 | @State var date = Date() 25 | 26 | ClockPickerView(date: $date) 27 | 28 | As the clock hands are changed, the *date* hour and minutes are updated. 29 | 30 | To customise the looks of the clock, use 31 | 32 | @ObservedObject var options = ClockLooks() 33 | 34 | and change the options as desired, see *ContenView.swift* 35 | 36 | ## Clock without hands 37 | 38 | **ClockTimePicker** can also display a clock without hands, more suited to iPad and Mac. To display it set the options as: 39 | 40 | options.withHands = false 41 | 42 | To pick the hour and minutes, tap on the center **hour : minute** to display either the hours or the minutes set. 43 | 44 | Note: adjust the sizes and colors using **options** to suit your device, see *ContenView.swift* 45 | 46 | ## Screenshots 47 | 48 | ![im01](Images/picture1.png) ![im03](Images/picture3.png) 49 | 50 | 51 | ![im04](Images/picture4.png) ![im05](Images/picture5.png) 52 | 53 | --------------------------------------------------------------------------------