├── Atmospheres.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── kmaarek.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── kmaarek.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Atmospheres ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── argon.colorset │ │ └── Contents.json │ ├── carbon_dioxide.colorset │ │ └── Contents.json │ ├── cell.colorset │ │ └── Contents.json │ ├── cell_selected.colorset │ │ └── Contents.json │ ├── earth.colorset │ │ └── Contents.json │ ├── helium.colorset │ │ └── Contents.json │ ├── hydrogen.colorset │ │ └── Contents.json │ ├── jupiter.colorset │ │ └── Contents.json │ ├── mars.colorset │ │ └── Contents.json │ ├── mercury.colorset │ │ └── Contents.json │ ├── methane.colorset │ │ └── Contents.json │ ├── neptune.colorset │ │ └── Contents.json │ ├── nitrogen.colorset │ │ └── Contents.json │ ├── other.colorset │ │ └── Contents.json │ ├── oxygen.colorset │ │ └── Contents.json │ ├── saturn.colorset │ │ └── Contents.json │ ├── saturn_ring.colorset │ │ └── Contents.json │ ├── sodium.colorset │ │ └── Contents.json │ ├── uranus.colorset │ │ └── Contents.json │ ├── uranus_ring.colorset │ │ └── Contents.json │ └── venus.colorset │ │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── SceneDelegate.swift └── Views │ ├── Cell │ └── PlanetCell.swift │ ├── Main │ └── Main.swift │ └── Planet │ ├── Icon │ ├── PlanetIcon.swift │ ├── PlanetRing.swift │ └── PlanetSize.swift │ ├── Info │ ├── Description │ │ ├── Composition │ │ │ ├── Chart.swift │ │ │ ├── CompositionModel.swift │ │ │ ├── CompositionView.swift │ │ │ ├── Index.swift │ │ │ └── IndexItem.swift │ │ └── Description.swift │ └── PlanetInfoModel.swift │ └── Planet.swift ├── README.md └── demo.gif /Atmospheres.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1049420D2398292E00C27573 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049420C2398292E00C27573 /* AppDelegate.swift */; }; 11 | 1049420F2398292E00C27573 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049420E2398292E00C27573 /* SceneDelegate.swift */; }; 12 | 104942112398292E00C27573 /* Main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104942102398292E00C27573 /* Main.swift */; }; 13 | 104942132398293000C27573 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 104942122398293000C27573 /* Assets.xcassets */; }; 14 | 104942162398293000C27573 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 104942152398293000C27573 /* Preview Assets.xcassets */; }; 15 | 104942192398293000C27573 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 104942172398293000C27573 /* LaunchScreen.storyboard */; }; 16 | 10494224239829A100C27573 /* PlanetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10494223239829A100C27573 /* PlanetCell.swift */; }; 17 | 10494227239829B600C27573 /* Planet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10494226239829B600C27573 /* Planet.swift */; }; 18 | 1049422A239829DE00C27573 /* PlanetIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10494229239829DE00C27573 /* PlanetIcon.swift */; }; 19 | 1049422D23982A1000C27573 /* PlanetSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049422C23982A1000C27573 /* PlanetSize.swift */; }; 20 | 1049423123982A2600C27573 /* PlanetRing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423023982A2600C27573 /* PlanetRing.swift */; }; 21 | 1049423323982A5A00C27573 /* PlanetInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423223982A5A00C27573 /* PlanetInfoModel.swift */; }; 22 | 1049423723982A8400C27573 /* CompositionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423623982A8400C27573 /* CompositionModel.swift */; }; 23 | 1049423A23982ABA00C27573 /* Chart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423923982ABA00C27573 /* Chart.swift */; }; 24 | 1049423C23982AD900C27573 /* IndexItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423B23982AD900C27573 /* IndexItem.swift */; }; 25 | 1049423E23982AFA00C27573 /* Index.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423D23982AFA00C27573 /* Index.swift */; }; 26 | 1049424023982B1000C27573 /* CompositionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049423F23982B1000C27573 /* CompositionView.swift */; }; 27 | 1049424323982B4700C27573 /* Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1049424223982B4700C27573 /* Description.swift */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 104942092398292E00C27573 /* Atmospheres.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Atmospheres.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 1049420C2398292E00C27573 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | 1049420E2398292E00C27573 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 34 | 104942102398292E00C27573 /* Main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Main.swift; sourceTree = ""; }; 35 | 104942122398293000C27573 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 36 | 104942152398293000C27573 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 37 | 104942182398293000C27573 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 38 | 1049421A2398293000C27573 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 10494223239829A100C27573 /* PlanetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetCell.swift; sourceTree = ""; }; 40 | 10494226239829B600C27573 /* Planet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Planet.swift; sourceTree = ""; }; 41 | 10494229239829DE00C27573 /* PlanetIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetIcon.swift; sourceTree = ""; }; 42 | 1049422C23982A1000C27573 /* PlanetSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetSize.swift; sourceTree = ""; }; 43 | 1049423023982A2600C27573 /* PlanetRing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetRing.swift; sourceTree = ""; }; 44 | 1049423223982A5A00C27573 /* PlanetInfoModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetInfoModel.swift; sourceTree = ""; }; 45 | 1049423623982A8400C27573 /* CompositionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompositionModel.swift; sourceTree = ""; }; 46 | 1049423923982ABA00C27573 /* Chart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Chart.swift; sourceTree = ""; }; 47 | 1049423B23982AD900C27573 /* IndexItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndexItem.swift; sourceTree = ""; }; 48 | 1049423D23982AFA00C27573 /* Index.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Index.swift; sourceTree = ""; }; 49 | 1049423F23982B1000C27573 /* CompositionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompositionView.swift; sourceTree = ""; }; 50 | 1049424223982B4700C27573 /* Description.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Description.swift; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 104942062398292E00C27573 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 104942002398292E00C27573 = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1049420B2398292E00C27573 /* Atmospheres */, 68 | 1049420A2398292E00C27573 /* Products */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | 1049420A2398292E00C27573 /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 104942092398292E00C27573 /* Atmospheres.app */, 76 | ); 77 | name = Products; 78 | sourceTree = ""; 79 | }; 80 | 1049420B2398292E00C27573 /* Atmospheres */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 104942202398296D00C27573 /* Views */, 84 | 1049420C2398292E00C27573 /* AppDelegate.swift */, 85 | 1049420E2398292E00C27573 /* SceneDelegate.swift */, 86 | 104942122398293000C27573 /* Assets.xcassets */, 87 | 104942172398293000C27573 /* LaunchScreen.storyboard */, 88 | 1049421A2398293000C27573 /* Info.plist */, 89 | 104942142398293000C27573 /* Preview Content */, 90 | ); 91 | path = Atmospheres; 92 | sourceTree = ""; 93 | }; 94 | 104942142398293000C27573 /* Preview Content */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 104942152398293000C27573 /* Preview Assets.xcassets */, 98 | ); 99 | path = "Preview Content"; 100 | sourceTree = ""; 101 | }; 102 | 104942202398296D00C27573 /* Views */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 10494225239829AC00C27573 /* Planet */, 106 | 104942222398298100C27573 /* Cell */, 107 | 104942212398297800C27573 /* Main */, 108 | ); 109 | path = Views; 110 | sourceTree = ""; 111 | }; 112 | 104942212398297800C27573 /* Main */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 104942102398292E00C27573 /* Main.swift */, 116 | ); 117 | path = Main; 118 | sourceTree = ""; 119 | }; 120 | 104942222398298100C27573 /* Cell */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 10494223239829A100C27573 /* PlanetCell.swift */, 124 | ); 125 | path = Cell; 126 | sourceTree = ""; 127 | }; 128 | 10494225239829AC00C27573 /* Planet */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 1049423423982A7100C27573 /* Info */, 132 | 10494228239829CF00C27573 /* Icon */, 133 | 10494226239829B600C27573 /* Planet.swift */, 134 | ); 135 | path = Planet; 136 | sourceTree = ""; 137 | }; 138 | 10494228239829CF00C27573 /* Icon */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 10494229239829DE00C27573 /* PlanetIcon.swift */, 142 | 1049422C23982A1000C27573 /* PlanetSize.swift */, 143 | 1049423023982A2600C27573 /* PlanetRing.swift */, 144 | ); 145 | path = Icon; 146 | sourceTree = ""; 147 | }; 148 | 1049423423982A7100C27573 /* Info */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 1049424123982B2D00C27573 /* Description */, 152 | 1049423223982A5A00C27573 /* PlanetInfoModel.swift */, 153 | ); 154 | path = Info; 155 | sourceTree = ""; 156 | }; 157 | 1049423823982AA000C27573 /* Composition */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 1049423623982A8400C27573 /* CompositionModel.swift */, 161 | 1049423923982ABA00C27573 /* Chart.swift */, 162 | 1049423B23982AD900C27573 /* IndexItem.swift */, 163 | 1049423D23982AFA00C27573 /* Index.swift */, 164 | 1049423F23982B1000C27573 /* CompositionView.swift */, 165 | ); 166 | path = Composition; 167 | sourceTree = ""; 168 | }; 169 | 1049424123982B2D00C27573 /* Description */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 1049423823982AA000C27573 /* Composition */, 173 | 1049424223982B4700C27573 /* Description.swift */, 174 | ); 175 | path = Description; 176 | sourceTree = ""; 177 | }; 178 | /* End PBXGroup section */ 179 | 180 | /* Begin PBXNativeTarget section */ 181 | 104942082398292E00C27573 /* Atmospheres */ = { 182 | isa = PBXNativeTarget; 183 | buildConfigurationList = 1049421D2398293000C27573 /* Build configuration list for PBXNativeTarget "Atmospheres" */; 184 | buildPhases = ( 185 | 104942052398292E00C27573 /* Sources */, 186 | 104942062398292E00C27573 /* Frameworks */, 187 | 104942072398292E00C27573 /* Resources */, 188 | ); 189 | buildRules = ( 190 | ); 191 | dependencies = ( 192 | ); 193 | name = Atmospheres; 194 | productName = Atmospheres; 195 | productReference = 104942092398292E00C27573 /* Atmospheres.app */; 196 | productType = "com.apple.product-type.application"; 197 | }; 198 | /* End PBXNativeTarget section */ 199 | 200 | /* Begin PBXProject section */ 201 | 104942012398292E00C27573 /* Project object */ = { 202 | isa = PBXProject; 203 | attributes = { 204 | LastSwiftUpdateCheck = 1110; 205 | LastUpgradeCheck = 1110; 206 | ORGANIZATIONNAME = "Kévin MAAREK"; 207 | TargetAttributes = { 208 | 104942082398292E00C27573 = { 209 | CreatedOnToolsVersion = 11.1; 210 | }; 211 | }; 212 | }; 213 | buildConfigurationList = 104942042398292E00C27573 /* Build configuration list for PBXProject "Atmospheres" */; 214 | compatibilityVersion = "Xcode 9.3"; 215 | developmentRegion = en; 216 | hasScannedForEncodings = 0; 217 | knownRegions = ( 218 | en, 219 | Base, 220 | ); 221 | mainGroup = 104942002398292E00C27573; 222 | productRefGroup = 1049420A2398292E00C27573 /* Products */; 223 | projectDirPath = ""; 224 | projectRoot = ""; 225 | targets = ( 226 | 104942082398292E00C27573 /* Atmospheres */, 227 | ); 228 | }; 229 | /* End PBXProject section */ 230 | 231 | /* Begin PBXResourcesBuildPhase section */ 232 | 104942072398292E00C27573 /* Resources */ = { 233 | isa = PBXResourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | 104942192398293000C27573 /* LaunchScreen.storyboard in Resources */, 237 | 104942162398293000C27573 /* Preview Assets.xcassets in Resources */, 238 | 104942132398293000C27573 /* Assets.xcassets in Resources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXResourcesBuildPhase section */ 243 | 244 | /* Begin PBXSourcesBuildPhase section */ 245 | 104942052398292E00C27573 /* Sources */ = { 246 | isa = PBXSourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 1049420D2398292E00C27573 /* AppDelegate.swift in Sources */, 250 | 1049423323982A5A00C27573 /* PlanetInfoModel.swift in Sources */, 251 | 1049420F2398292E00C27573 /* SceneDelegate.swift in Sources */, 252 | 1049423A23982ABA00C27573 /* Chart.swift in Sources */, 253 | 1049423E23982AFA00C27573 /* Index.swift in Sources */, 254 | 104942112398292E00C27573 /* Main.swift in Sources */, 255 | 1049423723982A8400C27573 /* CompositionModel.swift in Sources */, 256 | 1049424023982B1000C27573 /* CompositionView.swift in Sources */, 257 | 10494224239829A100C27573 /* PlanetCell.swift in Sources */, 258 | 1049422D23982A1000C27573 /* PlanetSize.swift in Sources */, 259 | 1049422A239829DE00C27573 /* PlanetIcon.swift in Sources */, 260 | 1049423C23982AD900C27573 /* IndexItem.swift in Sources */, 261 | 1049424323982B4700C27573 /* Description.swift in Sources */, 262 | 10494227239829B600C27573 /* Planet.swift in Sources */, 263 | 1049423123982A2600C27573 /* PlanetRing.swift in Sources */, 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | }; 267 | /* End PBXSourcesBuildPhase section */ 268 | 269 | /* Begin PBXVariantGroup section */ 270 | 104942172398293000C27573 /* LaunchScreen.storyboard */ = { 271 | isa = PBXVariantGroup; 272 | children = ( 273 | 104942182398293000C27573 /* Base */, 274 | ); 275 | name = LaunchScreen.storyboard; 276 | sourceTree = ""; 277 | }; 278 | /* End PBXVariantGroup section */ 279 | 280 | /* Begin XCBuildConfiguration section */ 281 | 1049421B2398293000C27573 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_ANALYZER_NONNULL = YES; 286 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 288 | CLANG_CXX_LIBRARY = "libc++"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_ENABLE_OBJC_ARC = YES; 291 | CLANG_ENABLE_OBJC_WEAK = YES; 292 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_COMMA = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 305 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 308 | CLANG_WARN_STRICT_PROTOTYPES = YES; 309 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 310 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 311 | CLANG_WARN_UNREACHABLE_CODE = YES; 312 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 313 | COPY_PHASE_STRIP = NO; 314 | DEBUG_INFORMATION_FORMAT = dwarf; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | ENABLE_TESTABILITY = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu11; 318 | GCC_DYNAMIC_NO_PIC = NO; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_PREPROCESSOR_DEFINITIONS = ( 322 | "DEBUG=1", 323 | "$(inherited)", 324 | ); 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 332 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 333 | MTL_FAST_MATH = YES; 334 | ONLY_ACTIVE_ARCH = YES; 335 | SDKROOT = iphoneos; 336 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 337 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 338 | }; 339 | name = Debug; 340 | }; 341 | 1049421C2398293000C27573 /* Release */ = { 342 | isa = XCBuildConfiguration; 343 | buildSettings = { 344 | ALWAYS_SEARCH_USER_PATHS = NO; 345 | CLANG_ANALYZER_NONNULL = YES; 346 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 348 | CLANG_CXX_LIBRARY = "libc++"; 349 | CLANG_ENABLE_MODULES = YES; 350 | CLANG_ENABLE_OBJC_ARC = YES; 351 | CLANG_ENABLE_OBJC_WEAK = YES; 352 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 353 | CLANG_WARN_BOOL_CONVERSION = YES; 354 | CLANG_WARN_COMMA = YES; 355 | CLANG_WARN_CONSTANT_CONVERSION = YES; 356 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 358 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 359 | CLANG_WARN_EMPTY_BODY = YES; 360 | CLANG_WARN_ENUM_CONVERSION = YES; 361 | CLANG_WARN_INFINITE_RECURSION = YES; 362 | CLANG_WARN_INT_CONVERSION = YES; 363 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 365 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 366 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 367 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 368 | CLANG_WARN_STRICT_PROTOTYPES = YES; 369 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 370 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 371 | CLANG_WARN_UNREACHABLE_CODE = YES; 372 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 373 | COPY_PHASE_STRIP = NO; 374 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 375 | ENABLE_NS_ASSERTIONS = NO; 376 | ENABLE_STRICT_OBJC_MSGSEND = YES; 377 | GCC_C_LANGUAGE_STANDARD = gnu11; 378 | GCC_NO_COMMON_BLOCKS = YES; 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 381 | GCC_WARN_UNDECLARED_SELECTOR = YES; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 383 | GCC_WARN_UNUSED_FUNCTION = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | IPHONEOS_DEPLOYMENT_TARGET = 13.1; 386 | MTL_ENABLE_DEBUG_INFO = NO; 387 | MTL_FAST_MATH = YES; 388 | SDKROOT = iphoneos; 389 | SWIFT_COMPILATION_MODE = wholemodule; 390 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 391 | VALIDATE_PRODUCT = YES; 392 | }; 393 | name = Release; 394 | }; 395 | 1049421E2398293000C27573 /* Debug */ = { 396 | isa = XCBuildConfiguration; 397 | buildSettings = { 398 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 399 | CODE_SIGN_STYLE = Automatic; 400 | DEVELOPMENT_ASSET_PATHS = "\"Atmospheres/Preview Content\""; 401 | DEVELOPMENT_TEAM = ZDHD52TS5R; 402 | ENABLE_PREVIEWS = YES; 403 | INFOPLIST_FILE = Atmospheres/Info.plist; 404 | LD_RUNPATH_SEARCH_PATHS = ( 405 | "$(inherited)", 406 | "@executable_path/Frameworks", 407 | ); 408 | PRODUCT_BUNDLE_IDENTIFIER = fr.kevinmaarek.Atmospheres; 409 | PRODUCT_NAME = "$(TARGET_NAME)"; 410 | SWIFT_VERSION = 5.0; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | }; 413 | name = Debug; 414 | }; 415 | 1049421F2398293000C27573 /* Release */ = { 416 | isa = XCBuildConfiguration; 417 | buildSettings = { 418 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 419 | CODE_SIGN_STYLE = Automatic; 420 | DEVELOPMENT_ASSET_PATHS = "\"Atmospheres/Preview Content\""; 421 | DEVELOPMENT_TEAM = ZDHD52TS5R; 422 | ENABLE_PREVIEWS = YES; 423 | INFOPLIST_FILE = Atmospheres/Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "@executable_path/Frameworks", 427 | ); 428 | PRODUCT_BUNDLE_IDENTIFIER = fr.kevinmaarek.Atmospheres; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | SWIFT_VERSION = 5.0; 431 | TARGETED_DEVICE_FAMILY = "1,2"; 432 | }; 433 | name = Release; 434 | }; 435 | /* End XCBuildConfiguration section */ 436 | 437 | /* Begin XCConfigurationList section */ 438 | 104942042398292E00C27573 /* Build configuration list for PBXProject "Atmospheres" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | 1049421B2398293000C27573 /* Debug */, 442 | 1049421C2398293000C27573 /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | 1049421D2398293000C27573 /* Build configuration list for PBXNativeTarget "Atmospheres" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | 1049421E2398293000C27573 /* Debug */, 451 | 1049421F2398293000C27573 /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | /* End XCConfigurationList section */ 457 | }; 458 | rootObject = 104942012398292E00C27573 /* Project object */; 459 | } 460 | -------------------------------------------------------------------------------- /Atmospheres.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Atmospheres.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Atmospheres.xcodeproj/project.xcworkspace/xcuserdata/kmaarek.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Que20/PlanetsAtmosphereSwiftUI/66b7c7b37f4d3cbf4ccf6ffa4f7cc95960046967/Atmospheres.xcodeproj/project.xcworkspace/xcuserdata/kmaarek.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Atmospheres.xcodeproj/xcuserdata/kmaarek.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Atmospheres.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Atmospheres/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. 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 | -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/argon.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.767", 13 | "alpha" : "1.000", 14 | "blue" : "0.424", 15 | "green" : "0.448" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/carbon_dioxide.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.657", 13 | "alpha" : "1.000", 14 | "blue" : "0.157", 15 | "green" : "0.316" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/cell.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "1.000", 14 | "blue" : "1.000", 15 | "green" : "1.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "light" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.921", 31 | "alpha" : "1.000", 32 | "blue" : "0.921", 33 | "green" : "0.921" 34 | } 35 | } 36 | }, 37 | { 38 | "idiom" : "universal", 39 | "appearances" : [ 40 | { 41 | "appearance" : "luminosity", 42 | "value" : "dark" 43 | } 44 | ], 45 | "color" : { 46 | "color-space" : "srgb", 47 | "components" : { 48 | "red" : "0.130", 49 | "alpha" : "1.000", 50 | "blue" : "0.130", 51 | "green" : "0.130" 52 | } 53 | } 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/cell_selected.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "1.000", 13 | "alpha" : "1.000", 14 | "blue" : "1.000", 15 | "green" : "1.000" 16 | } 17 | } 18 | }, 19 | { 20 | "idiom" : "universal", 21 | "appearances" : [ 22 | { 23 | "appearance" : "luminosity", 24 | "value" : "light" 25 | } 26 | ], 27 | "color" : { 28 | "color-space" : "srgb", 29 | "components" : { 30 | "red" : "0.837", 31 | "alpha" : "1.000", 32 | "blue" : "0.837", 33 | "green" : "0.837" 34 | } 35 | } 36 | }, 37 | { 38 | "idiom" : "universal", 39 | "appearances" : [ 40 | { 41 | "appearance" : "luminosity", 42 | "value" : "dark" 43 | } 44 | ], 45 | "color" : { 46 | "color-space" : "srgb", 47 | "components" : { 48 | "red" : "0.261", 49 | "alpha" : "1.000", 50 | "blue" : "0.261", 51 | "green" : "0.261" 52 | } 53 | } 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/earth.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.206", 13 | "alpha" : "1.000", 14 | "blue" : "0.639", 15 | "green" : "0.363" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/helium.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.802", 13 | "alpha" : "1.000", 14 | "blue" : "0.196", 15 | "green" : "0.545" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/hydrogen.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.294", 13 | "alpha" : "1.000", 14 | "blue" : "0.651", 15 | "green" : "0.383" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/jupiter.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.869", 13 | "alpha" : "1.000", 14 | "blue" : "0.502", 15 | "green" : "0.704" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/mars.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.759", 13 | "alpha" : "1.000", 14 | "blue" : "0.180", 15 | "green" : "0.410" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/mercury.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.678", 13 | "alpha" : "1.000", 14 | "blue" : "0.510", 15 | "green" : "0.589" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/methane.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.790", 13 | "alpha" : "1.000", 14 | "blue" : "0.353", 15 | "green" : "0.733" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/neptune.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.360", 13 | "alpha" : "1.000", 14 | "blue" : "0.682", 15 | "green" : "0.426" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/nitrogen.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.302", 13 | "alpha" : "1.000", 14 | "blue" : "0.667", 15 | "green" : "0.527" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/other.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.685", 13 | "alpha" : "1.000", 14 | "blue" : "0.510", 15 | "green" : "0.585" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/oxygen.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.595", 13 | "alpha" : "1.000", 14 | "blue" : "0.286", 15 | "green" : "0.678" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/saturn.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.898", 13 | "alpha" : "1.000", 14 | "blue" : "0.800", 15 | "green" : "0.872" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/saturn_ring.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.668", 13 | "alpha" : "1.000", 14 | "blue" : "0.259", 15 | "green" : "0.475" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/sodium.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.592", 13 | "alpha" : "1.000", 14 | "blue" : "0.580", 15 | "green" : "0.588" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/uranus.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.443", 13 | "alpha" : "1.000", 14 | "blue" : "0.812", 15 | "green" : "0.676" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/uranus_ring.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "0.754", 13 | "alpha" : "1.000", 14 | "blue" : "0.754", 15 | "green" : "0.754" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/Assets.xcassets/venus.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "display-p3", 11 | "components" : { 12 | "red" : "0.724", 13 | "alpha" : "1.000", 14 | "blue" : "0.180", 15 | "green" : "0.466" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /Atmospheres/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 | -------------------------------------------------------------------------------- /Atmospheres/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 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UISupportedInterfaceOrientations~ipad 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationPortraitUpsideDown 56 | UIInterfaceOrientationLandscapeLeft 57 | UIInterfaceOrientationLandscapeRight 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Atmospheres/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Atmospheres/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. 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 = Main() 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 | -------------------------------------------------------------------------------- /Atmospheres/Views/Cell/PlanetCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlanetCell.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetCell: View { 12 | let planet: Planet 13 | let selected: Bool 14 | let action: (Planet) -> () 15 | var body: some View { 16 | GeometryReader { geometry in 17 | Group { 18 | ZStack { 19 | Rectangle() 20 | .fill(self.selected ? Color("cell_selected") : Color("cell")) 21 | .animation(.spring()) 22 | VStack(alignment: .center, spacing: 15) { 23 | Text(self.planet.name()) 24 | self.planet.icon() 25 | } 26 | } 27 | } 28 | } 29 | .onTapGesture { 30 | self.action(self.planet) 31 | } 32 | .frame(width: 110.0) 33 | .cornerRadius(20) 34 | .shadow(color: Color.black.opacity(0.1), radius: 10) 35 | } 36 | } 37 | 38 | struct PlanetCell_Previews: PreviewProvider { 39 | static var previews: some View { 40 | HStack { 41 | PlanetCell(planet: .earth, selected: false) { (p) in 42 | // 43 | } 44 | PlanetCell(planet: .saturn, selected: true) { (p) in 45 | // 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Atmospheres/Views/Main/Main.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct Main: View { 12 | @State var current: Planet = .earth 13 | 14 | let planets: [Planet] = Planet.allCases 15 | 16 | var body: some View { 17 | NavigationView { 18 | ScrollView { 19 | VStack(alignment: .leading, spacing: 5) { 20 | Text("In the Solar system") 21 | .font(.largeTitle) 22 | .bold() 23 | .padding(.leading, 18) 24 | Text("Planets :") 25 | .font(.subheadline) 26 | .padding(.top) 27 | .padding(.leading) 28 | .padding(.bottom, -5) 29 | .foregroundColor(Color.gray) 30 | ScrollView(.horizontal) { 31 | HStack { 32 | Spacer() 33 | ForEach(self.planets, id: \.self) { planet in 34 | PlanetCell(planet: planet, selected: self.current == planet) { (selected) in 35 | self.current = selected 36 | } 37 | } 38 | } 39 | .padding(.vertical) 40 | .frame(height: 150) 41 | } 42 | PlanetDescription(planet: self.current) 43 | .animation(.spring()) 44 | } 45 | } 46 | .navigationBarTitle(Text("Atmospheres")) 47 | } 48 | } 49 | } 50 | 51 | struct MainView_Previews: PreviewProvider { 52 | static var previews: some View { 53 | Main() 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Icon/PlanetIcon.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlanetIcon.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetIcon: View { 12 | let color: Color 13 | let size: PlanetSize 14 | let ring: PlanetRing? 15 | 16 | var body: some View { 17 | ZStack { 18 | Group { 19 | Circle() 20 | .fill(self.color) 21 | } 22 | Group { 23 | RoundedRectangle(cornerRadius: 5) 24 | .fill(self.ring?.color() ?? Color.clear) 25 | .frame(width: ((self.hasVerticalRing()) ? 4 : (self.size.size() + 30)), height: ((self.hasVerticalRing()) ? (self.size.size() + 20) : 4)) 26 | } 27 | } 28 | .frame(width: self.size.size(), height: self.size.size(), alignment: .center) 29 | } 30 | 31 | init(color: Color, size: PlanetSize, ring: PlanetRing? = nil) { 32 | self.color = color 33 | self.size = size 34 | self.ring = ring 35 | } 36 | 37 | func hasVerticalRing() -> Bool { 38 | if let ring = self.ring { 39 | switch ring { 40 | case .vertical(_): 41 | return true 42 | default: 43 | return false 44 | } 45 | } else { 46 | return false 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Icon/PlanetRing.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlanetRing.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | enum PlanetRing { 12 | case horizontal(color: Color) 13 | case vertical(color: Color) 14 | 15 | func color() -> Color { 16 | switch self { 17 | case .horizontal(let color): 18 | return color 19 | case .vertical(let color): 20 | return color 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Icon/PlanetSize.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlanetSize.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | enum PlanetSize { 12 | case small 13 | case medium 14 | case large 15 | 16 | func size() -> CGFloat { 17 | switch self { 18 | case .small: 19 | return 30 20 | case .medium: 21 | return 40 22 | case .large: 23 | return 60 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Composition/Chart.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Chart.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetCompositionChart: View { 12 | var composition: [Composition] 13 | var body: some View { 14 | VStack(spacing: 0) { 15 | ForEach(self.composition) { element in 16 | Rectangle() 17 | .fill(element.color) 18 | .frame(width: 50, height: (element.occupation * 200)) 19 | } 20 | } 21 | .background(Color.gray) 22 | .clipShape(RoundedRectangle(cornerRadius: 10)) 23 | } 24 | } 25 | 26 | struct PlanetCompositionChart_Previews: PreviewProvider { 27 | static var previews: some View { 28 | PlanetCompositionChart(composition: [ 29 | Composition(id: 0, color: Color("oxygen"), occupation: 0.12, label: "Oxygen"), 30 | Composition(id: 1, color: Color("sodium"), occupation: 0.88, label: "Sodium") 31 | ]) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Composition/CompositionModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Composition.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct Composition: Identifiable { 12 | var id: Int 13 | let color: Color 14 | let occupation: CGFloat 15 | let label: String 16 | } 17 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Composition/CompositionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CompositionView.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetComposition: View { 12 | var composition: [Composition] 13 | var body: some View { 14 | HStack(alignment: .center) { 15 | PlanetCompositionChart(composition: self.composition) 16 | .padding(.leading, 20) 17 | PlanetCompositionIndex(composition: self.composition) 18 | } 19 | .padding() 20 | } 21 | } 22 | 23 | struct PlanetComposition_Previews: PreviewProvider { 24 | static var previews: some View { 25 | PlanetComposition(composition: [ 26 | Composition(id: 0, color: Color("oxygen"), occupation: 0.12, label: "Oxygen"), 27 | Composition(id: 1, color: Color("sodium"), occupation: 0.88, label: "Sodium") 28 | ]) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Composition/Index.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Index.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetCompositionIndex: View { 12 | var composition: [Composition] 13 | var body: some View { 14 | VStack (alignment: .leading) { 15 | ForEach(self.composition) { element in 16 | PlanetCompositionItem(element: element) 17 | } 18 | } 19 | .padding(.leading, 50) 20 | } 21 | } 22 | 23 | struct PlanetCompositionIndex_Previews: PreviewProvider { 24 | static var previews: some View { 25 | PlanetCompositionIndex(composition: [ 26 | Composition(id: 0, color: Color("oxygen"), occupation: 0.12, label: "Oxygen"), 27 | Composition(id: 1, color: Color("sodium"), occupation: 0.88, label: "Sodium") 28 | ]) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Composition/IndexItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IndexItem.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetCompositionItem: View { 12 | var element: Composition 13 | var formatedOccupation: String { 14 | if self.element.occupation * 100 < 1.0 { 15 | return "< 1" 16 | } else { 17 | return String(format: "%.0f", self.element.occupation*100) 18 | } 19 | } 20 | var body: some View { 21 | HStack(alignment: .firstTextBaseline) { 22 | Circle() 23 | .fill(self.element.color) 24 | .frame(width: 10, height: 10) 25 | Text("\(self.element.label) \(self.formatedOccupation) %") 26 | .animation(nil) 27 | } 28 | } 29 | } 30 | 31 | struct PlanetCompositionItem_Previews: PreviewProvider { 32 | static var previews: some View { 33 | PlanetCompositionItem(element: Composition(id: 0, color: Color("oxygen"), occupation: 0.42, label: "Oxygen")) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/Description/Description.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Description.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetDescription: View { 12 | let planet: Planet 13 | var planetInfo: PlanetInfo { 14 | PlanetInfo(planet: self.planet) 15 | } 16 | 17 | var body: some View { 18 | VStack(alignment: .leading) { 19 | Text(self.planet.name()) 20 | .font(.largeTitle) 21 | .padding(.leading) 22 | .animation(nil) 23 | Text("Pressure: \(self.planetInfo.pressure())") 24 | .padding(.leading) 25 | .animation(nil) 26 | PlanetComposition(composition: self.planetInfo.composition()) 27 | .padding(.leading) 28 | Text(self.planetInfo.note()) 29 | .padding(.leading) 30 | .animation(nil) 31 | 32 | ZStack { 33 | Rectangle() 34 | .fill(Color.gray.opacity(0.1)) 35 | VStack { 36 | Text("Planet sizes not to scale.") 37 | .font(.caption) 38 | Divider() 39 | Text("Inspired by : COMPOUNDS INTEREST") 40 | .font(.caption) 41 | Text("Twitter: @compoundchem") 42 | .font(.caption) 43 | .onTapGesture { 44 | let url = URL(string: "https://twitter.com/compoundchem")! 45 | UIApplication.shared.open(url, options: [:], completionHandler: nil) 46 | } 47 | Divider() 48 | Text("Atmospheric compositions taken from NASA") 49 | .font(.caption) 50 | Spacer() 51 | } 52 | .padding() 53 | } 54 | .padding(.top, 10) 55 | } 56 | } 57 | } 58 | 59 | struct PlanetDescription_Previews: PreviewProvider { 60 | static var previews: some View { 61 | PlanetDescription(planet: .earth) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Info/PlanetInfoModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlanetInfo.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct PlanetInfo { 12 | let planet: Planet 13 | 14 | func pressure() -> String { 15 | switch planet { 16 | case .mercury: 17 | return "~ 10^(-14) atm" 18 | case .venus: 19 | return "~ 90 atm" 20 | case .earth: 21 | return "~ 1 atm" 22 | case .mars: 23 | return "~ 0.0006 atm" 24 | case .jupiter: 25 | return ">> 1000 atm\nGas giant" 26 | case .saturn: 27 | return ">> 1000 atm\nGas giant" 28 | case .uranus: 29 | return ">> 1000 atm\nGas giant" 30 | case .neptune: 31 | return ">> 1000 atm\nGas giant" 32 | } 33 | } 34 | 35 | func note() -> String { 36 | switch planet { 37 | case .mercury: 38 | return "Other gases : He, K, Ar, CO2, H2O, N2, Xe, Kr, Ne" 39 | case .venus: 40 | return "Other gases : So2, Ar, H2O, CO2, He, Ne\nClouds of sufluric acid." 41 | case .earth: 42 | return "Other gases : CO2, Ne, He, CH4, Kr, H2" 43 | case .mars: 44 | return "Other gases : O2, CO2, H2O, NO, Ne, Kr, Xe" 45 | case .jupiter: 46 | return "Other gases : CH4, NH2, C2H4, N2O\nHydrogen is metallic at hight pressur." 47 | case .saturn: 48 | return "Other gases : CH4, C2H4, H2O\nSuflur gives gas clouds a yellow cast." 49 | case .uranus: 50 | return "Methane gas causes uranus's blue color." 51 | case .neptune: 52 | return "Strongest winds in the solar system." 53 | } 54 | } 55 | 56 | func composition() -> [Composition] { 57 | switch planet { 58 | case .mercury: 59 | return [ 60 | Composition(id: 0, color: Color("oxygen"), occupation: 0.42, label: "Oxygen"), 61 | Composition(id: 1, color: Color("sodium"), occupation: 0.29, label: "Sodium"), 62 | Composition(id: 2, color: Color("hydrogen"), occupation: 0.22, label: "Hydrogen"), 63 | Composition(id: 3, color: Color("other"), occupation: 0.07, label: "Other Gases") 64 | ] 65 | case .venus: 66 | return [ 67 | Composition(id: 0, color: Color("carbon_dioxide"), occupation: 0.96, label: "Carbon Dioxide"), 68 | Composition(id: 1, color: Color("nitrogen"), occupation: 0.03, label: "Nitrogen"), 69 | Composition(id: 2, color: Color("other"), occupation: 0.01, label: "Other Gases") 70 | ] 71 | case .earth: 72 | return [ 73 | Composition(id: 0, color: Color("nitrogen"), occupation: 0.78, label: "Nitrogen"), 74 | Composition(id: 1, color: Color("oxygen"), occupation: 0.21, label: "Oxygen"), 75 | Composition(id: 2, color: Color("argon"), occupation: 0.01, label: "Argon"), 76 | Composition(id: 3, color: Color("other"), occupation: 0.002, label: "Other Gases") 77 | ] 78 | case .mars: 79 | return [ 80 | Composition(id: 0, color: Color("carbon_dioxide"), occupation: 0.95, label: "Carbon Dioxide"), 81 | Composition(id: 1, color: Color("nitrogen"), occupation: 0.03, label: "Nitrogen"), 82 | Composition(id: 2, color: Color("argon"), occupation: 0.015, label: "Argon"), 83 | Composition(id: 3, color: Color("other"), occupation: 0.005, label: "Other Gases") 84 | ] 85 | case .jupiter: 86 | return [ 87 | Composition(id: 0, color: Color("hydrogen"), occupation: 0.90, label: "Hydrogen"), 88 | Composition(id: 1, color: Color("helium"), occupation: 0.10, label: "Helium"), 89 | Composition(id: 2, color: Color("other"), occupation: 0.002, label: "Other Gases") 90 | ] 91 | case .saturn: 92 | return [ 93 | Composition(id: 0, color: Color("hydrogen"), occupation: 0.96, label: "Hydrogen"), 94 | Composition(id: 1, color: Color("helium"), occupation: 0.03, label: "Helium"), 95 | Composition(id: 2, color: Color("other"), occupation: 0.01, label: "Other Gases") 96 | ] 97 | case .uranus: 98 | return [ 99 | Composition(id: 0, color: Color("hydrogen"), occupation: 0.83, label: "Hydrogen"), 100 | Composition(id: 1, color: Color("helium"), occupation: 0.15, label: "Helium"), 101 | Composition(id: 2, color: Color("methane"), occupation: 0.025, label: "Methane") 102 | ] 103 | case .neptune: 104 | return [ 105 | Composition(id: 0, color: Color("hydrogen"), occupation: 0.80, label: "Hydrogen"), 106 | Composition(id: 1, color: Color("helium"), occupation: 0.19, label: "Helium"), 107 | Composition(id: 2, color: Color("methane"), occupation: 0.001, label: "Methane") 108 | ] 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /Atmospheres/Views/Planet/Planet.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Planet.swift 3 | // Atmospheres 4 | // 5 | // Created by Kévin MAAREK on 04/12/2019. 6 | // Copyright © 2019 Kévin MAAREK. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | enum Planet: CaseIterable { 12 | case mercury 13 | case venus 14 | case earth 15 | case mars 16 | case jupiter 17 | case saturn 18 | case uranus 19 | case neptune 20 | 21 | func name() -> String { 22 | switch self { 23 | case .mercury: 24 | return "Mercury" 25 | case .venus: 26 | return "Venus" 27 | case .earth: 28 | return "Earth" 29 | case .mars: 30 | return "Mars" 31 | case .jupiter: 32 | return "Jupiter" 33 | case .saturn: 34 | return "Saturn" 35 | case .uranus: 36 | return "Uranus" 37 | case .neptune: 38 | return "Neptune" 39 | } 40 | } 41 | 42 | func icon() -> some View { 43 | switch self { 44 | case .mercury: 45 | return PlanetIcon(color: Color("mercury"), size: .small) 46 | case .venus: 47 | return PlanetIcon(color: Color("venus"), size: .medium) 48 | case .earth: 49 | return PlanetIcon(color: Color("earth"), size: .medium) 50 | case .mars: 51 | return PlanetIcon(color: Color("mars"), size: .small) 52 | case .jupiter: 53 | return PlanetIcon(color: Color("jupiter"), size: .large) 54 | case .saturn: 55 | return PlanetIcon(color: Color("saturn"), size: .medium, ring: .horizontal(color: Color("saturn_ring"))) 56 | case .uranus: 57 | return PlanetIcon(color: Color("uranus"), size: .medium, ring: .vertical(color: Color("uranus_ring"))) 58 | case .neptune: 59 | return PlanetIcon(color: Color("neptune"), size: .medium) 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PlanetsAtmosphereSwiftUI 2 | 3 | I recently stumbled upon this [chart](https://i.redd.it/24qp49sbvk241.jpg) on [r/coolguides](https://www.reddit.com/r/coolguides/comments/e5wace/graphic_about_the_atmosphere_on_different_planets/) about planets and their atmosphere and I wanted some quick and fun SwiftUI project to demo the framework to my friends. So I just adapted the chart in a simple SwiftUI app. 4 | 5 | Here is how it looks : 6 | 7 | ![Demo](https://raw.githubusercontent.com/Que20/PlanetsAtmosphereSwiftUI/master/demo.gif) 8 | 9 | Feel free to contribute :) 10 | 11 | Chart by [Compound Interest](https://twitter.com/compoundchem) 12 | 13 | Data by NASA 14 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Que20/PlanetsAtmosphereSwiftUI/66b7c7b37f4d3cbf4ccf6ffa4f7cc95960046967/demo.gif --------------------------------------------------------------------------------