├── MaterialSaturation.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── philipdavis.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ └── MaterialSaturation.xcscheme └── xcuserdata │ └── philipdavis.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── MaterialSaturation ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── bg.imageset │ │ ├── Contents.json │ │ ├── bg-1.png │ │ ├── bg-2.png │ │ └── bg.png ├── ContentView.swift ├── MaterialSaturationApp.swift └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── MaterialSaturationTests └── MaterialSaturationTests.swift ├── MaterialSaturationUITests ├── MaterialSaturationUITests.swift └── MaterialSaturationUITestsLaunchTests.swift └── README.md /MaterialSaturation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 488CA93D273F759F003E876D /* MaterialSaturationApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488CA93C273F759F003E876D /* MaterialSaturationApp.swift */; }; 11 | 488CA93F273F759F003E876D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488CA93E273F759F003E876D /* ContentView.swift */; }; 12 | 488CA941273F75A0003E876D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 488CA940273F75A0003E876D /* Assets.xcassets */; }; 13 | 488CA944273F75A0003E876D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 488CA943273F75A0003E876D /* Preview Assets.xcassets */; }; 14 | 488CA94E273F75A0003E876D /* MaterialSaturationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488CA94D273F75A0003E876D /* MaterialSaturationTests.swift */; }; 15 | 488CA958273F75A0003E876D /* MaterialSaturationUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488CA957273F75A0003E876D /* MaterialSaturationUITests.swift */; }; 16 | 488CA95A273F75A0003E876D /* MaterialSaturationUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 488CA959273F75A0003E876D /* MaterialSaturationUITestsLaunchTests.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 488CA94A273F75A0003E876D /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 488CA931273F759F003E876D /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 488CA938273F759F003E876D; 25 | remoteInfo = MaterialSaturation; 26 | }; 27 | 488CA954273F75A0003E876D /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 488CA931273F759F003E876D /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 488CA938273F759F003E876D; 32 | remoteInfo = MaterialSaturation; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 488CA939273F759F003E876D /* MaterialSaturation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MaterialSaturation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 488CA93C273F759F003E876D /* MaterialSaturationApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaterialSaturationApp.swift; sourceTree = ""; }; 39 | 488CA93E273F759F003E876D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 40 | 488CA940273F75A0003E876D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 41 | 488CA943273F75A0003E876D /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 42 | 488CA949273F75A0003E876D /* MaterialSaturationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialSaturationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 488CA94D273F75A0003E876D /* MaterialSaturationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaterialSaturationTests.swift; sourceTree = ""; }; 44 | 488CA953273F75A0003E876D /* MaterialSaturationUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialSaturationUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 488CA957273F75A0003E876D /* MaterialSaturationUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaterialSaturationUITests.swift; sourceTree = ""; }; 46 | 488CA959273F75A0003E876D /* MaterialSaturationUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaterialSaturationUITestsLaunchTests.swift; sourceTree = ""; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 488CA936273F759F003E876D /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | 488CA946273F75A0003E876D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | 488CA950273F75A0003E876D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 488CA930273F759F003E876D = { 75 | isa = PBXGroup; 76 | children = ( 77 | 488CA93B273F759F003E876D /* MaterialSaturation */, 78 | 488CA94C273F75A0003E876D /* MaterialSaturationTests */, 79 | 488CA956273F75A0003E876D /* MaterialSaturationUITests */, 80 | 488CA93A273F759F003E876D /* Products */, 81 | ); 82 | sourceTree = ""; 83 | }; 84 | 488CA93A273F759F003E876D /* Products */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 488CA939273F759F003E876D /* MaterialSaturation.app */, 88 | 488CA949273F75A0003E876D /* MaterialSaturationTests.xctest */, 89 | 488CA953273F75A0003E876D /* MaterialSaturationUITests.xctest */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 488CA93B273F759F003E876D /* MaterialSaturation */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 488CA93C273F759F003E876D /* MaterialSaturationApp.swift */, 98 | 488CA93E273F759F003E876D /* ContentView.swift */, 99 | 488CA940273F75A0003E876D /* Assets.xcassets */, 100 | 488CA942273F75A0003E876D /* Preview Content */, 101 | ); 102 | path = MaterialSaturation; 103 | sourceTree = ""; 104 | }; 105 | 488CA942273F75A0003E876D /* Preview Content */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 488CA943273F75A0003E876D /* Preview Assets.xcassets */, 109 | ); 110 | path = "Preview Content"; 111 | sourceTree = ""; 112 | }; 113 | 488CA94C273F75A0003E876D /* MaterialSaturationTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 488CA94D273F75A0003E876D /* MaterialSaturationTests.swift */, 117 | ); 118 | path = MaterialSaturationTests; 119 | sourceTree = ""; 120 | }; 121 | 488CA956273F75A0003E876D /* MaterialSaturationUITests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 488CA957273F75A0003E876D /* MaterialSaturationUITests.swift */, 125 | 488CA959273F75A0003E876D /* MaterialSaturationUITestsLaunchTests.swift */, 126 | ); 127 | path = MaterialSaturationUITests; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 488CA938273F759F003E876D /* MaterialSaturation */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 488CA95D273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturation" */; 136 | buildPhases = ( 137 | 488CA935273F759F003E876D /* Sources */, 138 | 488CA936273F759F003E876D /* Frameworks */, 139 | 488CA937273F759F003E876D /* Resources */, 140 | ); 141 | buildRules = ( 142 | ); 143 | dependencies = ( 144 | ); 145 | name = MaterialSaturation; 146 | productName = MaterialSaturation; 147 | productReference = 488CA939273F759F003E876D /* MaterialSaturation.app */; 148 | productType = "com.apple.product-type.application"; 149 | }; 150 | 488CA948273F75A0003E876D /* MaterialSaturationTests */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 488CA960273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturationTests" */; 153 | buildPhases = ( 154 | 488CA945273F75A0003E876D /* Sources */, 155 | 488CA946273F75A0003E876D /* Frameworks */, 156 | 488CA947273F75A0003E876D /* Resources */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | 488CA94B273F75A0003E876D /* PBXTargetDependency */, 162 | ); 163 | name = MaterialSaturationTests; 164 | productName = MaterialSaturationTests; 165 | productReference = 488CA949273F75A0003E876D /* MaterialSaturationTests.xctest */; 166 | productType = "com.apple.product-type.bundle.unit-test"; 167 | }; 168 | 488CA952273F75A0003E876D /* MaterialSaturationUITests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 488CA963273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturationUITests" */; 171 | buildPhases = ( 172 | 488CA94F273F75A0003E876D /* Sources */, 173 | 488CA950273F75A0003E876D /* Frameworks */, 174 | 488CA951273F75A0003E876D /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | 488CA955273F75A0003E876D /* PBXTargetDependency */, 180 | ); 181 | name = MaterialSaturationUITests; 182 | productName = MaterialSaturationUITests; 183 | productReference = 488CA953273F75A0003E876D /* MaterialSaturationUITests.xctest */; 184 | productType = "com.apple.product-type.bundle.ui-testing"; 185 | }; 186 | /* End PBXNativeTarget section */ 187 | 188 | /* Begin PBXProject section */ 189 | 488CA931273F759F003E876D /* Project object */ = { 190 | isa = PBXProject; 191 | attributes = { 192 | BuildIndependentTargetsInParallel = 1; 193 | LastSwiftUpdateCheck = 1310; 194 | LastUpgradeCheck = 1310; 195 | TargetAttributes = { 196 | 488CA938273F759F003E876D = { 197 | CreatedOnToolsVersion = 13.1; 198 | }; 199 | 488CA948273F75A0003E876D = { 200 | CreatedOnToolsVersion = 13.1; 201 | TestTargetID = 488CA938273F759F003E876D; 202 | }; 203 | 488CA952273F75A0003E876D = { 204 | CreatedOnToolsVersion = 13.1; 205 | TestTargetID = 488CA938273F759F003E876D; 206 | }; 207 | }; 208 | }; 209 | buildConfigurationList = 488CA934273F759F003E876D /* Build configuration list for PBXProject "MaterialSaturation" */; 210 | compatibilityVersion = "Xcode 13.0"; 211 | developmentRegion = en; 212 | hasScannedForEncodings = 0; 213 | knownRegions = ( 214 | en, 215 | Base, 216 | ); 217 | mainGroup = 488CA930273F759F003E876D; 218 | productRefGroup = 488CA93A273F759F003E876D /* Products */; 219 | projectDirPath = ""; 220 | projectRoot = ""; 221 | targets = ( 222 | 488CA938273F759F003E876D /* MaterialSaturation */, 223 | 488CA948273F75A0003E876D /* MaterialSaturationTests */, 224 | 488CA952273F75A0003E876D /* MaterialSaturationUITests */, 225 | ); 226 | }; 227 | /* End PBXProject section */ 228 | 229 | /* Begin PBXResourcesBuildPhase section */ 230 | 488CA937273F759F003E876D /* Resources */ = { 231 | isa = PBXResourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 488CA944273F75A0003E876D /* Preview Assets.xcassets in Resources */, 235 | 488CA941273F75A0003E876D /* Assets.xcassets in Resources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | 488CA947273F75A0003E876D /* Resources */ = { 240 | isa = PBXResourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | }; 246 | 488CA951273F75A0003E876D /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | }; 253 | /* End PBXResourcesBuildPhase section */ 254 | 255 | /* Begin PBXSourcesBuildPhase section */ 256 | 488CA935273F759F003E876D /* Sources */ = { 257 | isa = PBXSourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | 488CA93F273F759F003E876D /* ContentView.swift in Sources */, 261 | 488CA93D273F759F003E876D /* MaterialSaturationApp.swift in Sources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | 488CA945273F75A0003E876D /* Sources */ = { 266 | isa = PBXSourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | 488CA94E273F75A0003E876D /* MaterialSaturationTests.swift in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | 488CA94F273F75A0003E876D /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 488CA958273F75A0003E876D /* MaterialSaturationUITests.swift in Sources */, 278 | 488CA95A273F75A0003E876D /* MaterialSaturationUITestsLaunchTests.swift in Sources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | /* End PBXSourcesBuildPhase section */ 283 | 284 | /* Begin PBXTargetDependency section */ 285 | 488CA94B273F75A0003E876D /* PBXTargetDependency */ = { 286 | isa = PBXTargetDependency; 287 | target = 488CA938273F759F003E876D /* MaterialSaturation */; 288 | targetProxy = 488CA94A273F75A0003E876D /* PBXContainerItemProxy */; 289 | }; 290 | 488CA955273F75A0003E876D /* PBXTargetDependency */ = { 291 | isa = PBXTargetDependency; 292 | target = 488CA938273F759F003E876D /* MaterialSaturation */; 293 | targetProxy = 488CA954273F75A0003E876D /* PBXContainerItemProxy */; 294 | }; 295 | /* End PBXTargetDependency section */ 296 | 297 | /* Begin XCBuildConfiguration section */ 298 | 488CA95B273F75A0003E876D /* Debug */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ALWAYS_SEARCH_USER_PATHS = NO; 302 | CLANG_ANALYZER_NONNULL = YES; 303 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 304 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 305 | CLANG_CXX_LIBRARY = "libc++"; 306 | CLANG_ENABLE_MODULES = YES; 307 | CLANG_ENABLE_OBJC_ARC = YES; 308 | CLANG_ENABLE_OBJC_WEAK = YES; 309 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 310 | CLANG_WARN_BOOL_CONVERSION = YES; 311 | CLANG_WARN_COMMA = YES; 312 | CLANG_WARN_CONSTANT_CONVERSION = YES; 313 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 314 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 315 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 316 | CLANG_WARN_EMPTY_BODY = YES; 317 | CLANG_WARN_ENUM_CONVERSION = YES; 318 | CLANG_WARN_INFINITE_RECURSION = YES; 319 | CLANG_WARN_INT_CONVERSION = YES; 320 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 322 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 323 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 324 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu11; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 350 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 351 | MTL_FAST_MATH = YES; 352 | ONLY_ACTIVE_ARCH = YES; 353 | SDKROOT = iphoneos; 354 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 355 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 356 | }; 357 | name = Debug; 358 | }; 359 | 488CA95C273F75A0003E876D /* Release */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | ALWAYS_SEARCH_USER_PATHS = NO; 363 | CLANG_ANALYZER_NONNULL = YES; 364 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 365 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 366 | CLANG_CXX_LIBRARY = "libc++"; 367 | CLANG_ENABLE_MODULES = YES; 368 | CLANG_ENABLE_OBJC_ARC = YES; 369 | CLANG_ENABLE_OBJC_WEAK = YES; 370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_COMMA = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 376 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 377 | CLANG_WARN_EMPTY_BODY = YES; 378 | CLANG_WARN_ENUM_CONVERSION = YES; 379 | CLANG_WARN_INFINITE_RECURSION = YES; 380 | CLANG_WARN_INT_CONVERSION = YES; 381 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 382 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 385 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 386 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 387 | CLANG_WARN_STRICT_PROTOTYPES = YES; 388 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 389 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 390 | CLANG_WARN_UNREACHABLE_CODE = YES; 391 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 392 | COPY_PHASE_STRIP = NO; 393 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 394 | ENABLE_NS_ASSERTIONS = NO; 395 | ENABLE_STRICT_OBJC_MSGSEND = YES; 396 | GCC_C_LANGUAGE_STANDARD = gnu11; 397 | GCC_NO_COMMON_BLOCKS = YES; 398 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 399 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 400 | GCC_WARN_UNDECLARED_SELECTOR = YES; 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 402 | GCC_WARN_UNUSED_FUNCTION = YES; 403 | GCC_WARN_UNUSED_VARIABLE = YES; 404 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 405 | MTL_ENABLE_DEBUG_INFO = NO; 406 | MTL_FAST_MATH = YES; 407 | SDKROOT = iphoneos; 408 | SWIFT_COMPILATION_MODE = wholemodule; 409 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 410 | VALIDATE_PRODUCT = YES; 411 | }; 412 | name = Release; 413 | }; 414 | 488CA95E273F75A0003E876D /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 419 | CODE_SIGN_STYLE = Automatic; 420 | CURRENT_PROJECT_VERSION = 1; 421 | DEVELOPMENT_ASSET_PATHS = "\"MaterialSaturation/Preview Content\""; 422 | ENABLE_PREVIEWS = YES; 423 | GENERATE_INFOPLIST_FILE = YES; 424 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 425 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 426 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 427 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 428 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 429 | LD_RUNPATH_SEARCH_PATHS = ( 430 | "$(inherited)", 431 | "@executable_path/Frameworks", 432 | ); 433 | MARKETING_VERSION = 1.0; 434 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturation; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | SWIFT_EMIT_LOC_STRINGS = YES; 437 | SWIFT_VERSION = 5.0; 438 | TARGETED_DEVICE_FAMILY = "1,2"; 439 | }; 440 | name = Debug; 441 | }; 442 | 488CA95F273F75A0003E876D /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 446 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 447 | CODE_SIGN_STYLE = Automatic; 448 | CURRENT_PROJECT_VERSION = 1; 449 | DEVELOPMENT_ASSET_PATHS = "\"MaterialSaturation/Preview Content\""; 450 | ENABLE_PREVIEWS = YES; 451 | GENERATE_INFOPLIST_FILE = YES; 452 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 453 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 454 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 455 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 456 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 457 | LD_RUNPATH_SEARCH_PATHS = ( 458 | "$(inherited)", 459 | "@executable_path/Frameworks", 460 | ); 461 | MARKETING_VERSION = 1.0; 462 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturation; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | SWIFT_EMIT_LOC_STRINGS = YES; 465 | SWIFT_VERSION = 5.0; 466 | TARGETED_DEVICE_FAMILY = "1,2"; 467 | }; 468 | name = Release; 469 | }; 470 | 488CA961273F75A0003E876D /* Debug */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 474 | BUNDLE_LOADER = "$(TEST_HOST)"; 475 | CODE_SIGN_STYLE = Automatic; 476 | CURRENT_PROJECT_VERSION = 1; 477 | GENERATE_INFOPLIST_FILE = YES; 478 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 479 | LD_RUNPATH_SEARCH_PATHS = ( 480 | "$(inherited)", 481 | "@executable_path/Frameworks", 482 | "@loader_path/Frameworks", 483 | ); 484 | MARKETING_VERSION = 1.0; 485 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturationTests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_EMIT_LOC_STRINGS = NO; 488 | SWIFT_VERSION = 5.0; 489 | TARGETED_DEVICE_FAMILY = "1,2"; 490 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MaterialSaturation.app/MaterialSaturation"; 491 | }; 492 | name = Debug; 493 | }; 494 | 488CA962273F75A0003E876D /* Release */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 498 | BUNDLE_LOADER = "$(TEST_HOST)"; 499 | CODE_SIGN_STYLE = Automatic; 500 | CURRENT_PROJECT_VERSION = 1; 501 | GENERATE_INFOPLIST_FILE = YES; 502 | IPHONEOS_DEPLOYMENT_TARGET = 15.0; 503 | LD_RUNPATH_SEARCH_PATHS = ( 504 | "$(inherited)", 505 | "@executable_path/Frameworks", 506 | "@loader_path/Frameworks", 507 | ); 508 | MARKETING_VERSION = 1.0; 509 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturationTests; 510 | PRODUCT_NAME = "$(TARGET_NAME)"; 511 | SWIFT_EMIT_LOC_STRINGS = NO; 512 | SWIFT_VERSION = 5.0; 513 | TARGETED_DEVICE_FAMILY = "1,2"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MaterialSaturation.app/MaterialSaturation"; 515 | }; 516 | name = Release; 517 | }; 518 | 488CA964273F75A0003E876D /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 522 | CODE_SIGN_STYLE = Automatic; 523 | CURRENT_PROJECT_VERSION = 1; 524 | GENERATE_INFOPLIST_FILE = YES; 525 | LD_RUNPATH_SEARCH_PATHS = ( 526 | "$(inherited)", 527 | "@executable_path/Frameworks", 528 | "@loader_path/Frameworks", 529 | ); 530 | MARKETING_VERSION = 1.0; 531 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturationUITests; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | SWIFT_EMIT_LOC_STRINGS = NO; 534 | SWIFT_VERSION = 5.0; 535 | TARGETED_DEVICE_FAMILY = "1,2"; 536 | TEST_TARGET_NAME = MaterialSaturation; 537 | }; 538 | name = Debug; 539 | }; 540 | 488CA965273F75A0003E876D /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 544 | CODE_SIGN_STYLE = Automatic; 545 | CURRENT_PROJECT_VERSION = 1; 546 | GENERATE_INFOPLIST_FILE = YES; 547 | LD_RUNPATH_SEARCH_PATHS = ( 548 | "$(inherited)", 549 | "@executable_path/Frameworks", 550 | "@loader_path/Frameworks", 551 | ); 552 | MARKETING_VERSION = 1.0; 553 | PRODUCT_BUNDLE_IDENTIFIER = com.philipcdavis.MaterialSaturationUITests; 554 | PRODUCT_NAME = "$(TARGET_NAME)"; 555 | SWIFT_EMIT_LOC_STRINGS = NO; 556 | SWIFT_VERSION = 5.0; 557 | TARGETED_DEVICE_FAMILY = "1,2"; 558 | TEST_TARGET_NAME = MaterialSaturation; 559 | }; 560 | name = Release; 561 | }; 562 | /* End XCBuildConfiguration section */ 563 | 564 | /* Begin XCConfigurationList section */ 565 | 488CA934273F759F003E876D /* Build configuration list for PBXProject "MaterialSaturation" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 488CA95B273F75A0003E876D /* Debug */, 569 | 488CA95C273F75A0003E876D /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 488CA95D273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturation" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 488CA95E273F75A0003E876D /* Debug */, 578 | 488CA95F273F75A0003E876D /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | 488CA960273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturationTests" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 488CA961273F75A0003E876D /* Debug */, 587 | 488CA962273F75A0003E876D /* Release */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | 488CA963273F75A0003E876D /* Build configuration list for PBXNativeTarget "MaterialSaturationUITests" */ = { 593 | isa = XCConfigurationList; 594 | buildConfigurations = ( 595 | 488CA964273F75A0003E876D /* Debug */, 596 | 488CA965273F75A0003E876D /* Release */, 597 | ); 598 | defaultConfigurationIsVisible = 0; 599 | defaultConfigurationName = Release; 600 | }; 601 | /* End XCConfigurationList section */ 602 | }; 603 | rootObject = 488CA931273F759F003E876D /* Project object */; 604 | } 605 | -------------------------------------------------------------------------------- /MaterialSaturation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MaterialSaturation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /MaterialSaturation.xcodeproj/project.xcworkspace/xcuserdata/philipdavis.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philipcdavis/swiftui-material-saturation-example/388b300c49cc235a78280574208a06017f9adb47/MaterialSaturation.xcodeproj/project.xcworkspace/xcuserdata/philipdavis.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MaterialSaturation.xcodeproj/xcshareddata/xcschemes/MaterialSaturation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /MaterialSaturation.xcodeproj/xcuserdata/philipdavis.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MaterialSaturation.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 488CA938273F759F003E876D 16 | 17 | primary 18 | 19 | 20 | 488CA948273F75A0003E876D 21 | 22 | primary 23 | 24 | 25 | 488CA952273F75A0003E876D 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MaterialSaturation/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 | -------------------------------------------------------------------------------- /MaterialSaturation/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 | -------------------------------------------------------------------------------- /MaterialSaturation/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MaterialSaturation/Assets.xcassets/bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "bg-2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "bg.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "bg-1.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /MaterialSaturation/Assets.xcassets/bg.imageset/bg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philipcdavis/swiftui-material-saturation-example/388b300c49cc235a78280574208a06017f9adb47/MaterialSaturation/Assets.xcassets/bg.imageset/bg-1.png -------------------------------------------------------------------------------- /MaterialSaturation/Assets.xcassets/bg.imageset/bg-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philipcdavis/swiftui-material-saturation-example/388b300c49cc235a78280574208a06017f9adb47/MaterialSaturation/Assets.xcassets/bg.imageset/bg-2.png -------------------------------------------------------------------------------- /MaterialSaturation/Assets.xcassets/bg.imageset/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/philipcdavis/swiftui-material-saturation-example/388b300c49cc235a78280574208a06017f9adb47/MaterialSaturation/Assets.xcassets/bg.imageset/bg.png -------------------------------------------------------------------------------- /MaterialSaturation/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // MaterialSaturation 4 | // 5 | // Created by Philip Davis on 11/12/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | var materials: [Material] = [.ultraThinMaterial, .thinMaterial, .regularMaterial, .thickMaterial, .ultraThickMaterial] 12 | @State private var saturation = 1.0 13 | @State private var isDarkMode = true 14 | @State private var materialIndex = 0 15 | var body: some View { 16 | 17 | ZStack { 18 | Color(.black) 19 | VStack { 20 | ZStack { 21 | TabView { 22 | Image("bg").resizable().scaledToFill() 23 | Color(.black) 24 | Color(.white) 25 | HStack(spacing: 0) { 26 | Color(.white) 27 | Color(.black) 28 | Color(.white) 29 | Color(.black) 30 | Color(.white) 31 | Color(.black) 32 | Color(.white) 33 | Color(.black) 34 | Color(.white) 35 | } 36 | Color(.systemGray3) 37 | Color(.red) 38 | Color(.yellow) 39 | Color(.blue) 40 | 41 | 42 | }.tabViewStyle(PageTabViewStyle()) 43 | 44 | 45 | HStack(spacing: 20) { 46 | Image(systemName: "backward.fill") 47 | Image(systemName: "play.fill") 48 | Image(systemName: "forward.fill") 49 | 50 | }.font(.title) 51 | .padding(.horizontal, 24) 52 | .padding(.vertical, 16) 53 | .background(materials[materialIndex]) 54 | .saturation(saturation) 55 | .foregroundStyle(.primary) 56 | .preferredColorScheme(isDarkMode ? .dark : .light) 57 | .cornerRadius(100) 58 | } 59 | VStack(spacing: 20) { 60 | HStack { 61 | VStack(alignment: .leading) { 62 | Text(String(format: "Saturation: %.1f", saturation)).foregroundColor(.white) 63 | Slider( 64 | value: $saturation, 65 | in: 0...7 66 | ) 67 | } 68 | 69 | } 70 | 71 | 72 | 73 | VStack(alignment: .leading) { 74 | Text("Material").foregroundColor(.white) 75 | Picker("Select Material", selection: $materialIndex) { 76 | Text("xThin").tag(0) 77 | Text("Thin").tag(1) 78 | Text("Regular").tag(2) 79 | Text("Thick").tag(3) 80 | Text("xThick").tag(4) 81 | } 82 | .pickerStyle(.segmented) 83 | .colorScheme(.dark) 84 | } 85 | 86 | Toggle(isOn: $isDarkMode) { 87 | Text("Dark Mode").foregroundColor(.white) 88 | }.toggleStyle(SwitchToggleStyle(tint: Color.blue)) 89 | 90 | }.padding() 91 | 92 | 93 | 94 | 95 | } 96 | }.ignoresSafeArea() 97 | 98 | 99 | } 100 | } 101 | 102 | struct ContentView_Previews: PreviewProvider { 103 | static var previews: some View { 104 | ContentView() 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /MaterialSaturation/MaterialSaturationApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaterialSaturationApp.swift 3 | // MaterialSaturation 4 | // 5 | // Created by Philip Davis on 11/12/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct MaterialSaturationApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MaterialSaturation/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MaterialSaturationTests/MaterialSaturationTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaterialSaturationTests.swift 3 | // MaterialSaturationTests 4 | // 5 | // Created by Philip Davis on 11/12/21. 6 | // 7 | 8 | import XCTest 9 | @testable import MaterialSaturation 10 | 11 | class MaterialSaturationTests: XCTestCase { 12 | 13 | override func setUpWithError() throws { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | } 16 | 17 | override func tearDownWithError() throws { 18 | // Put teardown code here. This method is called after the invocation of each test method in the class. 19 | } 20 | 21 | func testExample() throws { 22 | // This is an example of a functional test case. 23 | // Use XCTAssert and related functions to verify your tests produce the correct results. 24 | } 25 | 26 | func testPerformanceExample() throws { 27 | // This is an example of a performance test case. 28 | self.measure { 29 | // Put the code you want to measure the time of here. 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /MaterialSaturationUITests/MaterialSaturationUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaterialSaturationUITests.swift 3 | // MaterialSaturationUITests 4 | // 5 | // Created by Philip Davis on 11/12/21. 6 | // 7 | 8 | import XCTest 9 | 10 | class MaterialSaturationUITests: XCTestCase { 11 | 12 | override func setUpWithError() throws { 13 | // Put setup code here. This method is called before the invocation of each test method in the class. 14 | 15 | // In UI tests it is usually best to stop immediately when a failure occurs. 16 | continueAfterFailure = false 17 | 18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 19 | } 20 | 21 | override func tearDownWithError() throws { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | func testExample() throws { 26 | // UI tests must launch the application that they test. 27 | let app = XCUIApplication() 28 | app.launch() 29 | 30 | // Use recording to get started writing UI tests. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | func testLaunchPerformance() throws { 35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { 36 | // This measures how long it takes to launch your application. 37 | measure(metrics: [XCTApplicationLaunchMetric()]) { 38 | XCUIApplication().launch() 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /MaterialSaturationUITests/MaterialSaturationUITestsLaunchTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MaterialSaturationUITestsLaunchTests.swift 3 | // MaterialSaturationUITests 4 | // 5 | // Created by Philip Davis on 11/12/21. 6 | // 7 | 8 | import XCTest 9 | 10 | class MaterialSaturationUITestsLaunchTests: XCTestCase { 11 | 12 | override class var runsForEachTargetApplicationUIConfiguration: Bool { 13 | true 14 | } 15 | 16 | override func setUpWithError() throws { 17 | continueAfterFailure = false 18 | } 19 | 20 | func testLaunch() throws { 21 | let app = XCUIApplication() 22 | app.launch() 23 | 24 | // Insert steps here to perform after app launch but before taking a screenshot, 25 | // such as logging into a test account or navigating somewhere in the app 26 | 27 | let attachment = XCTAttachment(screenshot: app.screenshot()) 28 | attachment.name = "Launch Screen" 29 | attachment.lifetime = .keepAlways 30 | add(attachment) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # swiftui-material-saturation-example 2 | 3 | https://user-images.githubusercontent.com/3452573/141815227-392fca4b-095a-4503-b765-2a699027d136.mp4 4 | 5 | --------------------------------------------------------------------------------