├── .DS_Store ├── README.md ├── SwiftUIGrids.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── alfianlosari.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── alfianlosari.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── SwiftUIGrids ├── .DS_Store ├── Assets.xcassets │ ├── .DS_Store │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── image-0.imageset │ │ ├── 20191208_103804.jpg │ │ └── Contents.json │ ├── image-1.imageset │ │ ├── 20200112_115222.jpg │ │ └── Contents.json │ ├── image-10.imageset │ │ ├── 20200113_132112.jpg │ │ └── Contents.json │ ├── image-11.imageset │ │ ├── 20190604_173118.jpg │ │ └── Contents.json │ ├── image-12.imageset │ │ ├── 20190919_092111.jpg │ │ └── Contents.json │ ├── image-13.imageset │ │ ├── 20190918_124849.jpg │ │ └── Contents.json │ ├── image-14.imageset │ │ ├── 20190917_122917.jpg │ │ └── Contents.json │ ├── image-15.imageset │ │ ├── 20190917_111139.jpg │ │ └── Contents.json │ ├── image-16.imageset │ │ ├── 20190917_094856.jpg │ │ └── Contents.json │ ├── image-17.imageset │ │ ├── 20190915_160901.jpg │ │ └── Contents.json │ ├── image-18.imageset │ │ ├── 20190915_113402.jpg │ │ └── Contents.json │ ├── image-19.imageset │ │ ├── 20190915_111942.jpg │ │ └── Contents.json │ ├── image-2.imageset │ │ ├── 20200112_130824.jpg │ │ └── Contents.json │ ├── image-20.imageset │ │ ├── 20190914_132019.jpg │ │ └── Contents.json │ ├── image-21.imageset │ │ ├── 20190914_124407.jpg │ │ └── Contents.json │ ├── image-22.imageset │ │ ├── 20190914_110156.jpg │ │ └── Contents.json │ ├── image-23.imageset │ │ ├── 20190914_095128.jpg │ │ └── Contents.json │ ├── image-24.imageset │ │ ├── 20190623_204400.jpg │ │ └── Contents.json │ ├── image-25.imageset │ │ ├── 20190608_162847.jpg │ │ └── Contents.json │ ├── image-26.imageset │ │ ├── 20190607_175604.jpg │ │ └── Contents.json │ ├── image-27.imageset │ │ ├── 20190607_174114.jpg │ │ └── Contents.json │ ├── image-28.imageset │ │ ├── 20190605_152808.jpg │ │ └── Contents.json │ ├── image-29.imageset │ │ ├── 20190605_152658.jpg │ │ └── Contents.json │ ├── image-3.imageset │ │ ├── 20200113_152820.jpg │ │ └── Contents.json │ ├── image-30.imageset │ │ ├── 20190605_100835.jpg │ │ └── Contents.json │ ├── image-31.imageset │ │ ├── 20190604_172457.jpg │ │ └── Contents.json │ ├── image-4.imageset │ │ ├── 20190603_125403.jpg │ │ └── Contents.json │ ├── image-5.imageset │ │ ├── 20200113_153526.jpg │ │ └── Contents.json │ ├── image-6.imageset │ │ ├── 20200115_095252.jpg │ │ └── Contents.json │ ├── image-7.imageset │ │ ├── 20200115_100145.jpg │ │ └── Contents.json │ ├── image-8.imageset │ │ ├── 20200115_100145.jpg │ │ └── Contents.json │ ├── image-9.imageset │ │ ├── 20200119_155655.jpg │ │ └── Contents.json │ └── image.imageset │ │ ├── Contents.json │ │ └── Screen Shot 2020-07-23 at 10.52.50.png ├── ContentView.swift ├── Info.plist ├── Models │ ├── Item.swift │ └── LayoutType.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── SingleRow.swift └── SwiftUIGridsApp.swift └── promo.jpg /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Building Adaptive Vertical Grid List with LazyVGrid in SwiftUI 2 2 | 3 | ![Alt text](./promo.jpg?raw=true "SwiftUI Adaptive VGrid List") 4 | 5 | Sample app of an iOS app that uses a single Vertical Grid to build a LazyVGrid list that supports 3 different layouts of. We should be able to switch the layout in the runtime using a segmented picker. 6 | 7 | ## Tutorial Video 8 | Youtube link at https://youtu.be/E7mdb9QqKsY 9 | 10 | ## Requirement 11 | - Xcode 12 12 | 13 | ## Getting Started 14 | - Clone 15 | - Build and Run with Xcode 12 16 | -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8B946DC024CD8B1300EEF220 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B946DBF24CD8B1300EEF220 /* Item.swift */; }; 11 | 8B946DC324CD8B9600EEF220 /* LayoutType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B946DC224CD8B9600EEF220 /* LayoutType.swift */; }; 12 | 8B946DC524CD8C6300EEF220 /* SingleRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B946DC424CD8C6300EEF220 /* SingleRow.swift */; }; 13 | 8BC4459B24C932D6006A7900 /* SwiftUIGridsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BC4459A24C932D6006A7900 /* SwiftUIGridsApp.swift */; }; 14 | 8BC4459D24C932D6006A7900 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BC4459C24C932D6006A7900 /* ContentView.swift */; }; 15 | 8BC4459F24C932D7006A7900 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8BC4459E24C932D7006A7900 /* Assets.xcassets */; }; 16 | 8BC445A224C932D7006A7900 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8BC445A124C932D7006A7900 /* Preview Assets.xcassets */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 8B946DBF24CD8B1300EEF220 /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = ""; }; 21 | 8B946DC224CD8B9600EEF220 /* LayoutType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutType.swift; sourceTree = ""; }; 22 | 8B946DC424CD8C6300EEF220 /* SingleRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SingleRow.swift; sourceTree = ""; }; 23 | 8BC4459724C932D6006A7900 /* SwiftUIGrids.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUIGrids.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 8BC4459A24C932D6006A7900 /* SwiftUIGridsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIGridsApp.swift; sourceTree = ""; }; 25 | 8BC4459C24C932D6006A7900 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 26 | 8BC4459E24C932D7006A7900 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 8BC445A124C932D7006A7900 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 28 | 8BC445A324C932D7006A7900 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 8BC4459424C932D6006A7900 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 8B946DC124CD8B8C00EEF220 /* Models */ = { 43 | isa = PBXGroup; 44 | children = ( 45 | 8B946DBF24CD8B1300EEF220 /* Item.swift */, 46 | 8B946DC224CD8B9600EEF220 /* LayoutType.swift */, 47 | ); 48 | path = Models; 49 | sourceTree = ""; 50 | }; 51 | 8BC4458E24C932D6006A7900 = { 52 | isa = PBXGroup; 53 | children = ( 54 | 8BC4459924C932D6006A7900 /* SwiftUIGrids */, 55 | 8BC4459824C932D6006A7900 /* Products */, 56 | ); 57 | sourceTree = ""; 58 | }; 59 | 8BC4459824C932D6006A7900 /* Products */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 8BC4459724C932D6006A7900 /* SwiftUIGrids.app */, 63 | ); 64 | name = Products; 65 | sourceTree = ""; 66 | }; 67 | 8BC4459924C932D6006A7900 /* SwiftUIGrids */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 8BC4459A24C932D6006A7900 /* SwiftUIGridsApp.swift */, 71 | 8BC4459C24C932D6006A7900 /* ContentView.swift */, 72 | 8B946DC424CD8C6300EEF220 /* SingleRow.swift */, 73 | 8B946DC124CD8B8C00EEF220 /* Models */, 74 | 8BC4459E24C932D7006A7900 /* Assets.xcassets */, 75 | 8BC445A324C932D7006A7900 /* Info.plist */, 76 | 8BC445A024C932D7006A7900 /* Preview Content */, 77 | ); 78 | path = SwiftUIGrids; 79 | sourceTree = ""; 80 | }; 81 | 8BC445A024C932D7006A7900 /* Preview Content */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 8BC445A124C932D7006A7900 /* Preview Assets.xcassets */, 85 | ); 86 | path = "Preview Content"; 87 | sourceTree = ""; 88 | }; 89 | /* End PBXGroup section */ 90 | 91 | /* Begin PBXNativeTarget section */ 92 | 8BC4459624C932D6006A7900 /* SwiftUIGrids */ = { 93 | isa = PBXNativeTarget; 94 | buildConfigurationList = 8BC445A624C932D7006A7900 /* Build configuration list for PBXNativeTarget "SwiftUIGrids" */; 95 | buildPhases = ( 96 | 8BC4459324C932D6006A7900 /* Sources */, 97 | 8BC4459424C932D6006A7900 /* Frameworks */, 98 | 8BC4459524C932D6006A7900 /* Resources */, 99 | ); 100 | buildRules = ( 101 | ); 102 | dependencies = ( 103 | ); 104 | name = SwiftUIGrids; 105 | productName = SwiftUIGrids; 106 | productReference = 8BC4459724C932D6006A7900 /* SwiftUIGrids.app */; 107 | productType = "com.apple.product-type.application"; 108 | }; 109 | /* End PBXNativeTarget section */ 110 | 111 | /* Begin PBXProject section */ 112 | 8BC4458F24C932D6006A7900 /* Project object */ = { 113 | isa = PBXProject; 114 | attributes = { 115 | LastSwiftUpdateCheck = 1200; 116 | LastUpgradeCheck = 1200; 117 | TargetAttributes = { 118 | 8BC4459624C932D6006A7900 = { 119 | CreatedOnToolsVersion = 12.0; 120 | }; 121 | }; 122 | }; 123 | buildConfigurationList = 8BC4459224C932D6006A7900 /* Build configuration list for PBXProject "SwiftUIGrids" */; 124 | compatibilityVersion = "Xcode 9.3"; 125 | developmentRegion = en; 126 | hasScannedForEncodings = 0; 127 | knownRegions = ( 128 | en, 129 | Base, 130 | ); 131 | mainGroup = 8BC4458E24C932D6006A7900; 132 | productRefGroup = 8BC4459824C932D6006A7900 /* Products */; 133 | projectDirPath = ""; 134 | projectRoot = ""; 135 | targets = ( 136 | 8BC4459624C932D6006A7900 /* SwiftUIGrids */, 137 | ); 138 | }; 139 | /* End PBXProject section */ 140 | 141 | /* Begin PBXResourcesBuildPhase section */ 142 | 8BC4459524C932D6006A7900 /* Resources */ = { 143 | isa = PBXResourcesBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 8BC445A224C932D7006A7900 /* Preview Assets.xcassets in Resources */, 147 | 8BC4459F24C932D7006A7900 /* Assets.xcassets in Resources */, 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | /* End PBXResourcesBuildPhase section */ 152 | 153 | /* Begin PBXSourcesBuildPhase section */ 154 | 8BC4459324C932D6006A7900 /* Sources */ = { 155 | isa = PBXSourcesBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | 8BC4459D24C932D6006A7900 /* ContentView.swift in Sources */, 159 | 8B946DC024CD8B1300EEF220 /* Item.swift in Sources */, 160 | 8BC4459B24C932D6006A7900 /* SwiftUIGridsApp.swift in Sources */, 161 | 8B946DC324CD8B9600EEF220 /* LayoutType.swift in Sources */, 162 | 8B946DC524CD8C6300EEF220 /* SingleRow.swift in Sources */, 163 | ); 164 | runOnlyForDeploymentPostprocessing = 0; 165 | }; 166 | /* End PBXSourcesBuildPhase section */ 167 | 168 | /* Begin XCBuildConfiguration section */ 169 | 8BC445A424C932D7006A7900 /* Debug */ = { 170 | isa = XCBuildConfiguration; 171 | buildSettings = { 172 | ALWAYS_SEARCH_USER_PATHS = NO; 173 | CLANG_ANALYZER_NONNULL = YES; 174 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 175 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 176 | CLANG_CXX_LIBRARY = "libc++"; 177 | CLANG_ENABLE_MODULES = YES; 178 | CLANG_ENABLE_OBJC_ARC = YES; 179 | CLANG_ENABLE_OBJC_WEAK = YES; 180 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 181 | CLANG_WARN_BOOL_CONVERSION = YES; 182 | CLANG_WARN_COMMA = YES; 183 | CLANG_WARN_CONSTANT_CONVERSION = YES; 184 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 185 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 186 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 187 | CLANG_WARN_EMPTY_BODY = YES; 188 | CLANG_WARN_ENUM_CONVERSION = YES; 189 | CLANG_WARN_INFINITE_RECURSION = YES; 190 | CLANG_WARN_INT_CONVERSION = YES; 191 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 193 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 194 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 195 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 196 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 197 | CLANG_WARN_STRICT_PROTOTYPES = YES; 198 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 199 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 200 | CLANG_WARN_UNREACHABLE_CODE = YES; 201 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 202 | COPY_PHASE_STRIP = NO; 203 | DEBUG_INFORMATION_FORMAT = dwarf; 204 | ENABLE_STRICT_OBJC_MSGSEND = YES; 205 | ENABLE_TESTABILITY = YES; 206 | GCC_C_LANGUAGE_STANDARD = gnu11; 207 | GCC_DYNAMIC_NO_PIC = NO; 208 | GCC_NO_COMMON_BLOCKS = YES; 209 | GCC_OPTIMIZATION_LEVEL = 0; 210 | GCC_PREPROCESSOR_DEFINITIONS = ( 211 | "DEBUG=1", 212 | "$(inherited)", 213 | ); 214 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 215 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 216 | GCC_WARN_UNDECLARED_SELECTOR = YES; 217 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 218 | GCC_WARN_UNUSED_FUNCTION = YES; 219 | GCC_WARN_UNUSED_VARIABLE = YES; 220 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 221 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 222 | MTL_FAST_MATH = YES; 223 | ONLY_ACTIVE_ARCH = YES; 224 | SDKROOT = iphoneos; 225 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 226 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 227 | }; 228 | name = Debug; 229 | }; 230 | 8BC445A524C932D7006A7900 /* Release */ = { 231 | isa = XCBuildConfiguration; 232 | buildSettings = { 233 | ALWAYS_SEARCH_USER_PATHS = NO; 234 | CLANG_ANALYZER_NONNULL = YES; 235 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 236 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 237 | CLANG_CXX_LIBRARY = "libc++"; 238 | CLANG_ENABLE_MODULES = YES; 239 | CLANG_ENABLE_OBJC_ARC = YES; 240 | CLANG_ENABLE_OBJC_WEAK = YES; 241 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 242 | CLANG_WARN_BOOL_CONVERSION = YES; 243 | CLANG_WARN_COMMA = YES; 244 | CLANG_WARN_CONSTANT_CONVERSION = YES; 245 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 246 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 247 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 248 | CLANG_WARN_EMPTY_BODY = YES; 249 | CLANG_WARN_ENUM_CONVERSION = YES; 250 | CLANG_WARN_INFINITE_RECURSION = YES; 251 | CLANG_WARN_INT_CONVERSION = YES; 252 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 253 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 254 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 255 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 256 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 261 | CLANG_WARN_UNREACHABLE_CODE = YES; 262 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu11; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | MTL_FAST_MATH = YES; 278 | SDKROOT = iphoneos; 279 | SWIFT_COMPILATION_MODE = wholemodule; 280 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 281 | VALIDATE_PRODUCT = YES; 282 | }; 283 | name = Release; 284 | }; 285 | 8BC445A724C932D7006A7900 /* Debug */ = { 286 | isa = XCBuildConfiguration; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 290 | CODE_SIGN_STYLE = Automatic; 291 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUIGrids/Preview Content\""; 292 | DEVELOPMENT_TEAM = 5C2XD9H2JS; 293 | ENABLE_PREVIEWS = YES; 294 | INFOPLIST_FILE = SwiftUIGrids/Info.plist; 295 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 296 | LD_RUNPATH_SEARCH_PATHS = ( 297 | "$(inherited)", 298 | "@executable_path/Frameworks", 299 | ); 300 | PRODUCT_BUNDLE_IDENTIFIER = com.alfianlosari.SwiftUIGrids; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | SWIFT_VERSION = 5.0; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | }; 305 | name = Debug; 306 | }; 307 | 8BC445A824C932D7006A7900 /* Release */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 312 | CODE_SIGN_STYLE = Automatic; 313 | DEVELOPMENT_ASSET_PATHS = "\"SwiftUIGrids/Preview Content\""; 314 | DEVELOPMENT_TEAM = 5C2XD9H2JS; 315 | ENABLE_PREVIEWS = YES; 316 | INFOPLIST_FILE = SwiftUIGrids/Info.plist; 317 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 318 | LD_RUNPATH_SEARCH_PATHS = ( 319 | "$(inherited)", 320 | "@executable_path/Frameworks", 321 | ); 322 | PRODUCT_BUNDLE_IDENTIFIER = com.alfianlosari.SwiftUIGrids; 323 | PRODUCT_NAME = "$(TARGET_NAME)"; 324 | SWIFT_VERSION = 5.0; 325 | TARGETED_DEVICE_FAMILY = "1,2"; 326 | }; 327 | name = Release; 328 | }; 329 | /* End XCBuildConfiguration section */ 330 | 331 | /* Begin XCConfigurationList section */ 332 | 8BC4459224C932D6006A7900 /* Build configuration list for PBXProject "SwiftUIGrids" */ = { 333 | isa = XCConfigurationList; 334 | buildConfigurations = ( 335 | 8BC445A424C932D7006A7900 /* Debug */, 336 | 8BC445A524C932D7006A7900 /* Release */, 337 | ); 338 | defaultConfigurationIsVisible = 0; 339 | defaultConfigurationName = Release; 340 | }; 341 | 8BC445A624C932D7006A7900 /* Build configuration list for PBXNativeTarget "SwiftUIGrids" */ = { 342 | isa = XCConfigurationList; 343 | buildConfigurations = ( 344 | 8BC445A724C932D7006A7900 /* Debug */, 345 | 8BC445A824C932D7006A7900 /* Release */, 346 | ); 347 | defaultConfigurationIsVisible = 0; 348 | defaultConfigurationName = Release; 349 | }; 350 | /* End XCConfigurationList section */ 351 | }; 352 | rootObject = 8BC4458F24C932D6006A7900 /* Project object */; 353 | } 354 | -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/project.xcworkspace/xcuserdata/alfianlosari.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids.xcodeproj/project.xcworkspace/xcuserdata/alfianlosari.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/xcuserdata/alfianlosari.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /SwiftUIGrids.xcodeproj/xcuserdata/alfianlosari.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SwiftUIGrids.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SwiftUIGrids/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/.DS_Store -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/.DS_Store -------------------------------------------------------------------------------- /SwiftUIGrids/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 | -------------------------------------------------------------------------------- /SwiftUIGrids/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 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-0.imageset/20191208_103804.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-0.imageset/20191208_103804.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20191208_103804.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-1.imageset/20200112_115222.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-1.imageset/20200112_115222.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200112_115222.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-10.imageset/20200113_132112.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-10.imageset/20200113_132112.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200113_132112.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-11.imageset/20190604_173118.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-11.imageset/20190604_173118.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190604_173118.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-12.imageset/20190919_092111.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-12.imageset/20190919_092111.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190919_092111.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-13.imageset/20190918_124849.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-13.imageset/20190918_124849.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190918_124849.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-14.imageset/20190917_122917.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-14.imageset/20190917_122917.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190917_122917.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-15.imageset/20190917_111139.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-15.imageset/20190917_111139.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190917_111139.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-16.imageset/20190917_094856.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-16.imageset/20190917_094856.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-16.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190917_094856.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-17.imageset/20190915_160901.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-17.imageset/20190915_160901.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-17.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190915_160901.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-18.imageset/20190915_113402.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-18.imageset/20190915_113402.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-18.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190915_113402.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-19.imageset/20190915_111942.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-19.imageset/20190915_111942.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-19.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190915_111942.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-2.imageset/20200112_130824.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-2.imageset/20200112_130824.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200112_130824.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-20.imageset/20190914_132019.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-20.imageset/20190914_132019.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-20.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190914_132019.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-21.imageset/20190914_124407.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-21.imageset/20190914_124407.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-21.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190914_124407.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-22.imageset/20190914_110156.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-22.imageset/20190914_110156.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-22.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190914_110156.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-23.imageset/20190914_095128.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-23.imageset/20190914_095128.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-23.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190914_095128.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-24.imageset/20190623_204400.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-24.imageset/20190623_204400.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-24.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190623_204400.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-25.imageset/20190608_162847.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-25.imageset/20190608_162847.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-25.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190608_162847.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-26.imageset/20190607_175604.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-26.imageset/20190607_175604.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-26.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190607_175604.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-27.imageset/20190607_174114.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-27.imageset/20190607_174114.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-27.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190607_174114.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-28.imageset/20190605_152808.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-28.imageset/20190605_152808.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-28.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190605_152808.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-29.imageset/20190605_152658.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-29.imageset/20190605_152658.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-29.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190605_152658.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-3.imageset/20200113_152820.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-3.imageset/20200113_152820.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200113_152820.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-30.imageset/20190605_100835.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-30.imageset/20190605_100835.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-30.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190605_100835.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-31.imageset/20190604_172457.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-31.imageset/20190604_172457.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-31.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190604_172457.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-4.imageset/20190603_125403.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-4.imageset/20190603_125403.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20190603_125403.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-5.imageset/20200113_153526.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-5.imageset/20200113_153526.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200113_153526.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-6.imageset/20200115_095252.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-6.imageset/20200115_095252.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200115_095252.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-7.imageset/20200115_100145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-7.imageset/20200115_100145.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200115_100145.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-8.imageset/20200115_100145.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-8.imageset/20200115_100145.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200115_100145.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-9.imageset/20200119_155655.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image-9.imageset/20200119_155655.jpg -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image-9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "20200119_155655.jpg", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Screen Shot 2020-07-23 at 10.52.50.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SwiftUIGrids/Assets.xcassets/image.imageset/Screen Shot 2020-07-23 at 10.52.50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/SwiftUIGrids/Assets.xcassets/image.imageset/Screen Shot 2020-07-23 at 10.52.50.png -------------------------------------------------------------------------------- /SwiftUIGrids/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // SwiftUIGrids 4 | // 5 | // Created by Alfian Losari on 23/07/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | var items = Item.stubs 13 | @State var selectedLayout: LayoutType = .single 14 | 15 | var body: some View { 16 | VStack { 17 | Picker("Layout Style", selection: $selectedLayout) { 18 | ForEach(LayoutType.allCases, id: \.self) { type in 19 | switch type { 20 | case .single: 21 | Image(systemName: "list.bullet") 22 | case .double: 23 | Image(systemName: "square.grid.2x2") 24 | case .adaptive: 25 | Image(systemName: "square.grid.3x3") 26 | } 27 | } 28 | }.pickerStyle(SegmentedPickerStyle()) 29 | .padding(.all, 10) 30 | 31 | ScrollView { 32 | LazyVGrid(columns: selectedLayout.columns, spacing: 1, content: { 33 | ForEach(items) { (item) in 34 | switch selectedLayout { 35 | case .single: 36 | SingleRow( 37 | imageName: item.imageName, 38 | title: item.title, 39 | subtitle: item.subtitle 40 | ).padding(.horizontal, 16) 41 | .padding(.vertical, 8) 42 | 43 | default: 44 | Image(item.imageName) 45 | .resizable() 46 | .aspectRatio(contentMode: .fill) 47 | } 48 | } 49 | }) 50 | .animation(.default) 51 | } 52 | } 53 | } 54 | } 55 | 56 | struct ContentView_Previews: PreviewProvider { 57 | static var previews: some View { 58 | Group { 59 | ContentView(selectedLayout: .single) 60 | ContentView(selectedLayout: .double) 61 | ContentView(selectedLayout: .adaptive) 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /SwiftUIGrids/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 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /SwiftUIGrids/Models/Item.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Item.swift 3 | // SwiftUIGrids 4 | // 5 | // Created by Alfian Losari on 26/07/20. 6 | // 7 | 8 | import Foundation 9 | 10 | struct Item: Identifiable { 11 | let id = UUID() 12 | let title: String 13 | let subtitle: String 14 | let imageName: String 15 | } 16 | 17 | extension Item { 18 | 19 | static var stubs: [Item] { 20 | (0...31).map { 21 | Item( 22 | title: "Title: \($0)", 23 | subtitle: "Subtitle: \($0)", 24 | imageName: "image-\($0)" 25 | ) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SwiftUIGrids/Models/LayoutType.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LayoutType.swift 3 | // SwiftUIGrids 4 | // 5 | // Created by Alfian Losari on 26/07/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | enum LayoutType: CaseIterable { 11 | case single 12 | case double 13 | case adaptive 14 | } 15 | 16 | extension LayoutType { 17 | 18 | var columns: [GridItem] { 19 | switch self { 20 | case .single: 21 | return [ 22 | GridItem(.flexible(), spacing: 0) 23 | ] 24 | 25 | case .double: 26 | return [ 27 | GridItem(.flexible(), spacing: 1), 28 | GridItem(.flexible(), spacing: 1) 29 | ] 30 | 31 | case .adaptive: 32 | return [ 33 | GridItem(.adaptive(minimum: 100), spacing: 1) 34 | ] 35 | } 36 | } 37 | 38 | } 39 | 40 | -------------------------------------------------------------------------------- /SwiftUIGrids/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIGrids/SingleRow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SingleRow.swift 3 | // SwiftUIGrids 4 | // 5 | // Created by Alfian Losari on 26/07/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SingleRow: View { 11 | 12 | let imageName: String 13 | let title: String 14 | let subtitle: String 15 | 16 | var body: some View { 17 | HStack { 18 | Image(imageName) 19 | .resizable() 20 | .aspectRatio(contentMode: .fit) 21 | .frame(width: 50) 22 | .cornerRadius(3) 23 | 24 | VStack(alignment: .leading, spacing: 4) { 25 | Text(title) 26 | .font(.headline) 27 | Text(subtitle) 28 | .font(.subheadline) 29 | } 30 | Spacer() 31 | } 32 | } 33 | 34 | } 35 | 36 | struct SingleRow_Previews: PreviewProvider { 37 | static var previews: some View { 38 | SingleRow(imageName: "image", title: "title", subtitle: "subtitle") 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /SwiftUIGrids/SwiftUIGridsApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIGridsApp.swift 3 | // SwiftUIGrids 4 | // 5 | // Created by Alfian Losari on 23/07/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct SwiftUIGridsApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /promo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/SwiftUI2LazyVGrid/aaf75332ee43c9707e2b771ca6071fe2438de7a1/promo.jpg --------------------------------------------------------------------------------