├── DynamicLazyVGrid.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── elaidzhashchukin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── elaidzhashchukin.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── DynamicLazyVGrid ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── ContentView.swift ├── DynamicLazyVGridApp.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── SquareAnimate.swift └── README.md /DynamicLazyVGrid.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E4068F9A2AC8C5A8005A75FC /* DynamicLazyVGridApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4068F992AC8C5A8005A75FC /* DynamicLazyVGridApp.swift */; }; 11 | E4068F9C2AC8C5A8005A75FC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4068F9B2AC8C5A8005A75FC /* ContentView.swift */; }; 12 | E4068F9E2AC8C5A9005A75FC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E4068F9D2AC8C5A9005A75FC /* Assets.xcassets */; }; 13 | E4068FA12AC8C5A9005A75FC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E4068FA02AC8C5A9005A75FC /* Preview Assets.xcassets */; }; 14 | E4068FAE2ACA2AEB005A75FC /* SquareAnimate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4068FAD2ACA2AEB005A75FC /* SquareAnimate.swift */; }; 15 | /* End PBXBuildFile section */ 16 | 17 | /* Begin PBXFileReference section */ 18 | E4068F962AC8C5A8005A75FC /* DynamicLazyVGrid.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicLazyVGrid.app; sourceTree = BUILT_PRODUCTS_DIR; }; 19 | E4068F992AC8C5A8005A75FC /* DynamicLazyVGridApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicLazyVGridApp.swift; sourceTree = ""; }; 20 | E4068F9B2AC8C5A8005A75FC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 21 | E4068F9D2AC8C5A9005A75FC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | E4068FA02AC8C5A9005A75FC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 23 | E4068FAD2ACA2AEB005A75FC /* SquareAnimate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SquareAnimate.swift; sourceTree = ""; }; 24 | /* End PBXFileReference section */ 25 | 26 | /* Begin PBXFrameworksBuildPhase section */ 27 | E4068F932AC8C5A8005A75FC /* Frameworks */ = { 28 | isa = PBXFrameworksBuildPhase; 29 | buildActionMask = 2147483647; 30 | files = ( 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | E4068F8D2AC8C5A8005A75FC = { 38 | isa = PBXGroup; 39 | children = ( 40 | E4068F982AC8C5A8005A75FC /* DynamicLazyVGrid */, 41 | E4068F972AC8C5A8005A75FC /* Products */, 42 | ); 43 | sourceTree = ""; 44 | }; 45 | E4068F972AC8C5A8005A75FC /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | E4068F962AC8C5A8005A75FC /* DynamicLazyVGrid.app */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | E4068F982AC8C5A8005A75FC /* DynamicLazyVGrid */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | E4068F992AC8C5A8005A75FC /* DynamicLazyVGridApp.swift */, 57 | E4068F9B2AC8C5A8005A75FC /* ContentView.swift */, 58 | E4068F9D2AC8C5A9005A75FC /* Assets.xcassets */, 59 | E4068F9F2AC8C5A9005A75FC /* Preview Content */, 60 | E4068FAD2ACA2AEB005A75FC /* SquareAnimate.swift */, 61 | ); 62 | path = DynamicLazyVGrid; 63 | sourceTree = ""; 64 | }; 65 | E4068F9F2AC8C5A9005A75FC /* Preview Content */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | E4068FA02AC8C5A9005A75FC /* Preview Assets.xcassets */, 69 | ); 70 | path = "Preview Content"; 71 | sourceTree = ""; 72 | }; 73 | /* End PBXGroup section */ 74 | 75 | /* Begin PBXNativeTarget section */ 76 | E4068F952AC8C5A8005A75FC /* DynamicLazyVGrid */ = { 77 | isa = PBXNativeTarget; 78 | buildConfigurationList = E4068FA42AC8C5A9005A75FC /* Build configuration list for PBXNativeTarget "DynamicLazyVGrid" */; 79 | buildPhases = ( 80 | E4068F922AC8C5A8005A75FC /* Sources */, 81 | E4068F932AC8C5A8005A75FC /* Frameworks */, 82 | E4068F942AC8C5A8005A75FC /* Resources */, 83 | ); 84 | buildRules = ( 85 | ); 86 | dependencies = ( 87 | ); 88 | name = DynamicLazyVGrid; 89 | productName = DynamicLazyVGrid; 90 | productReference = E4068F962AC8C5A8005A75FC /* DynamicLazyVGrid.app */; 91 | productType = "com.apple.product-type.application"; 92 | }; 93 | /* End PBXNativeTarget section */ 94 | 95 | /* Begin PBXProject section */ 96 | E4068F8E2AC8C5A8005A75FC /* Project object */ = { 97 | isa = PBXProject; 98 | attributes = { 99 | BuildIndependentTargetsInParallel = 1; 100 | LastSwiftUpdateCheck = 1500; 101 | LastUpgradeCheck = 1500; 102 | TargetAttributes = { 103 | E4068F952AC8C5A8005A75FC = { 104 | CreatedOnToolsVersion = 15.0; 105 | LastSwiftMigration = 1500; 106 | }; 107 | }; 108 | }; 109 | buildConfigurationList = E4068F912AC8C5A8005A75FC /* Build configuration list for PBXProject "DynamicLazyVGrid" */; 110 | compatibilityVersion = "Xcode 14.0"; 111 | developmentRegion = en; 112 | hasScannedForEncodings = 0; 113 | knownRegions = ( 114 | en, 115 | Base, 116 | ); 117 | mainGroup = E4068F8D2AC8C5A8005A75FC; 118 | productRefGroup = E4068F972AC8C5A8005A75FC /* Products */; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | E4068F952AC8C5A8005A75FC /* DynamicLazyVGrid */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXResourcesBuildPhase section */ 128 | E4068F942AC8C5A8005A75FC /* Resources */ = { 129 | isa = PBXResourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | E4068FA12AC8C5A9005A75FC /* Preview Assets.xcassets in Resources */, 133 | E4068F9E2AC8C5A9005A75FC /* Assets.xcassets in Resources */, 134 | ); 135 | runOnlyForDeploymentPostprocessing = 0; 136 | }; 137 | /* End PBXResourcesBuildPhase section */ 138 | 139 | /* Begin PBXSourcesBuildPhase section */ 140 | E4068F922AC8C5A8005A75FC /* Sources */ = { 141 | isa = PBXSourcesBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | E4068F9C2AC8C5A8005A75FC /* ContentView.swift in Sources */, 145 | E4068FAE2ACA2AEB005A75FC /* SquareAnimate.swift in Sources */, 146 | E4068F9A2AC8C5A8005A75FC /* DynamicLazyVGridApp.swift in Sources */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | /* End PBXSourcesBuildPhase section */ 151 | 152 | /* Begin XCBuildConfiguration section */ 153 | E4068FA22AC8C5A9005A75FC /* Debug */ = { 154 | isa = XCBuildConfiguration; 155 | buildSettings = { 156 | ALWAYS_SEARCH_USER_PATHS = NO; 157 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 158 | CLANG_ANALYZER_NONNULL = YES; 159 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 160 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 161 | CLANG_ENABLE_MODULES = YES; 162 | CLANG_ENABLE_OBJC_ARC = YES; 163 | CLANG_ENABLE_OBJC_WEAK = YES; 164 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 165 | CLANG_WARN_BOOL_CONVERSION = YES; 166 | CLANG_WARN_COMMA = YES; 167 | CLANG_WARN_CONSTANT_CONVERSION = YES; 168 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 169 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 170 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 171 | CLANG_WARN_EMPTY_BODY = YES; 172 | CLANG_WARN_ENUM_CONVERSION = YES; 173 | CLANG_WARN_INFINITE_RECURSION = YES; 174 | CLANG_WARN_INT_CONVERSION = YES; 175 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 176 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 177 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 178 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 179 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 180 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 181 | CLANG_WARN_STRICT_PROTOTYPES = YES; 182 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 183 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 184 | CLANG_WARN_UNREACHABLE_CODE = YES; 185 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 186 | COPY_PHASE_STRIP = NO; 187 | DEBUG_INFORMATION_FORMAT = dwarf; 188 | ENABLE_STRICT_OBJC_MSGSEND = YES; 189 | ENABLE_TESTABILITY = YES; 190 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 191 | GCC_C_LANGUAGE_STANDARD = gnu17; 192 | GCC_DYNAMIC_NO_PIC = NO; 193 | GCC_NO_COMMON_BLOCKS = YES; 194 | GCC_OPTIMIZATION_LEVEL = 0; 195 | GCC_PREPROCESSOR_DEFINITIONS = ( 196 | "DEBUG=1", 197 | "$(inherited)", 198 | ); 199 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 200 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 201 | GCC_WARN_UNDECLARED_SELECTOR = YES; 202 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 203 | GCC_WARN_UNUSED_FUNCTION = YES; 204 | GCC_WARN_UNUSED_VARIABLE = YES; 205 | IPHONEOS_DEPLOYMENT_TARGET = 16.0; 206 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 207 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 208 | MTL_FAST_MATH = YES; 209 | ONLY_ACTIVE_ARCH = YES; 210 | SDKROOT = iphoneos; 211 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 212 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 213 | }; 214 | name = Debug; 215 | }; 216 | E4068FA32AC8C5A9005A75FC /* Release */ = { 217 | isa = XCBuildConfiguration; 218 | buildSettings = { 219 | ALWAYS_SEARCH_USER_PATHS = NO; 220 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 221 | CLANG_ANALYZER_NONNULL = YES; 222 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 223 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 224 | CLANG_ENABLE_MODULES = YES; 225 | CLANG_ENABLE_OBJC_ARC = YES; 226 | CLANG_ENABLE_OBJC_WEAK = YES; 227 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 228 | CLANG_WARN_BOOL_CONVERSION = YES; 229 | CLANG_WARN_COMMA = YES; 230 | CLANG_WARN_CONSTANT_CONVERSION = YES; 231 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 232 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 233 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 234 | CLANG_WARN_EMPTY_BODY = YES; 235 | CLANG_WARN_ENUM_CONVERSION = YES; 236 | CLANG_WARN_INFINITE_RECURSION = YES; 237 | CLANG_WARN_INT_CONVERSION = YES; 238 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 239 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 240 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 241 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 242 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 243 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 244 | CLANG_WARN_STRICT_PROTOTYPES = YES; 245 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 246 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 247 | CLANG_WARN_UNREACHABLE_CODE = YES; 248 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 249 | COPY_PHASE_STRIP = NO; 250 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 251 | ENABLE_NS_ASSERTIONS = NO; 252 | ENABLE_STRICT_OBJC_MSGSEND = YES; 253 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 254 | GCC_C_LANGUAGE_STANDARD = gnu17; 255 | GCC_NO_COMMON_BLOCKS = YES; 256 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 257 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 258 | GCC_WARN_UNDECLARED_SELECTOR = YES; 259 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 260 | GCC_WARN_UNUSED_FUNCTION = YES; 261 | GCC_WARN_UNUSED_VARIABLE = YES; 262 | IPHONEOS_DEPLOYMENT_TARGET = 16.0; 263 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 264 | MTL_ENABLE_DEBUG_INFO = NO; 265 | MTL_FAST_MATH = YES; 266 | SDKROOT = iphoneos; 267 | SWIFT_COMPILATION_MODE = wholemodule; 268 | VALIDATE_PRODUCT = YES; 269 | }; 270 | name = Release; 271 | }; 272 | E4068FA52AC8C5A9005A75FC /* Debug */ = { 273 | isa = XCBuildConfiguration; 274 | buildSettings = { 275 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 276 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 277 | CLANG_ENABLE_MODULES = YES; 278 | CODE_SIGN_STYLE = Automatic; 279 | CURRENT_PROJECT_VERSION = 1; 280 | DEVELOPMENT_ASSET_PATHS = "\"DynamicLazyVGrid/Preview Content\""; 281 | DEVELOPMENT_TEAM = 748RM22H5Z; 282 | ENABLE_PREVIEWS = YES; 283 | GENERATE_INFOPLIST_FILE = YES; 284 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 285 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 286 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 287 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 288 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 289 | LD_RUNPATH_SEARCH_PATHS = ( 290 | "$(inherited)", 291 | "@executable_path/Frameworks", 292 | ); 293 | MARKETING_VERSION = 1.0; 294 | PRODUCT_BUNDLE_IDENTIFIER = EliId.DynamicLazyVGrid; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_EMIT_LOC_STRINGS = YES; 297 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 298 | SWIFT_VERSION = 5.0; 299 | TARGETED_DEVICE_FAMILY = "1,2"; 300 | }; 301 | name = Debug; 302 | }; 303 | E4068FA62AC8C5A9005A75FC /* Release */ = { 304 | isa = XCBuildConfiguration; 305 | buildSettings = { 306 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 307 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 308 | CLANG_ENABLE_MODULES = YES; 309 | CODE_SIGN_STYLE = Automatic; 310 | CURRENT_PROJECT_VERSION = 1; 311 | DEVELOPMENT_ASSET_PATHS = "\"DynamicLazyVGrid/Preview Content\""; 312 | DEVELOPMENT_TEAM = 748RM22H5Z; 313 | ENABLE_PREVIEWS = YES; 314 | GENERATE_INFOPLIST_FILE = YES; 315 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 316 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 317 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 318 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 319 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 320 | LD_RUNPATH_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "@executable_path/Frameworks", 323 | ); 324 | MARKETING_VERSION = 1.0; 325 | PRODUCT_BUNDLE_IDENTIFIER = EliId.DynamicLazyVGrid; 326 | PRODUCT_NAME = "$(TARGET_NAME)"; 327 | SWIFT_EMIT_LOC_STRINGS = YES; 328 | SWIFT_VERSION = 5.0; 329 | TARGETED_DEVICE_FAMILY = "1,2"; 330 | }; 331 | name = Release; 332 | }; 333 | /* End XCBuildConfiguration section */ 334 | 335 | /* Begin XCConfigurationList section */ 336 | E4068F912AC8C5A8005A75FC /* Build configuration list for PBXProject "DynamicLazyVGrid" */ = { 337 | isa = XCConfigurationList; 338 | buildConfigurations = ( 339 | E4068FA22AC8C5A9005A75FC /* Debug */, 340 | E4068FA32AC8C5A9005A75FC /* Release */, 341 | ); 342 | defaultConfigurationIsVisible = 0; 343 | defaultConfigurationName = Release; 344 | }; 345 | E4068FA42AC8C5A9005A75FC /* Build configuration list for PBXNativeTarget "DynamicLazyVGrid" */ = { 346 | isa = XCConfigurationList; 347 | buildConfigurations = ( 348 | E4068FA52AC8C5A9005A75FC /* Debug */, 349 | E4068FA62AC8C5A9005A75FC /* Release */, 350 | ); 351 | defaultConfigurationIsVisible = 0; 352 | defaultConfigurationName = Release; 353 | }; 354 | /* End XCConfigurationList section */ 355 | }; 356 | rootObject = E4068F8E2AC8C5A8005A75FC /* Project object */; 357 | } 358 | -------------------------------------------------------------------------------- /DynamicLazyVGrid.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DynamicLazyVGrid.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DynamicLazyVGrid.xcodeproj/project.xcworkspace/xcuserdata/elaidzhashchukin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Elaidzha1940/DynamicLazyVGrid/e17ee345155cc5cd00530f34376217eae7576355/DynamicLazyVGrid.xcodeproj/project.xcworkspace/xcuserdata/elaidzhashchukin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DynamicLazyVGrid.xcodeproj/xcuserdata/elaidzhashchukin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DynamicLazyVGrid.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/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 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/ContentView.swift: -------------------------------------------------------------------------------- 1 | // /* 2 | // 3 | // Project: DynamicLazyVGrid 4 | // File: ContentView.swift 5 | // Created by: Elaidzha Shchukin 6 | // Date: 01.10.2023 7 | // 8 | // */ 9 | 10 | import SwiftUI 11 | 12 | struct ContentView: View { 13 | @State var Height: CGFloat = 120 14 | @State var heightSecond: CGFloat = 150 15 | 16 | let colors : [Color] = [.black.opacity(0.1), .black.opacity(0.2), .black.opacity(0.3), .black.opacity(0.4), .black.opacity(0.5), .black.opacity(0.6), .black.opacity(0.7), .black.opacity(0.8), .black.opacity(0.9), .black.opacity(0.1)] 17 | 18 | var body: some View { 19 | 20 | ScrollView { 21 | SquareAnimate(Height: $Height, heightSecond: $heightSecond) 22 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .trailing) 23 | .padding() 24 | LazyVGrid(columns: [GridItem(.adaptive(minimum: Height), spacing: 10)], spacing: 10) { 25 | ForEach(0..<10) {item in 26 | RoundedRectangle(cornerRadius: 20, style: .continuous) 27 | .frame(height: heightSecond) 28 | .foregroundColor(colors[item % colors.count]) 29 | } 30 | .shadow(radius: 10) 31 | } 32 | .padding(.horizontal) 33 | } 34 | } 35 | } 36 | 37 | #Preview { 38 | ContentView() 39 | } 40 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/DynamicLazyVGridApp.swift: -------------------------------------------------------------------------------- 1 | // /* 2 | // 3 | // Project: DynamicLazyVGrid 4 | // File: ContentView.swift 5 | // Created by: Elaidzha Shchukin 6 | // Date: 01.10.2023 7 | // 8 | // */ 9 | 10 | import SwiftUI 11 | 12 | @main 13 | struct DynamicLazyVGridApp: App { 14 | var body: some Scene { 15 | WindowGroup { 16 | ContentView() 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DynamicLazyVGrid/SquareAnimate.swift: -------------------------------------------------------------------------------- 1 | // /* 2 | // 3 | // Project: DynamicLazyVGrid 4 | // File: ContentView.swift 5 | // Created by: Elaidzha Shchukin 6 | // Date: 02.10.2023 7 | // 8 | // */ 9 | 10 | import SwiftUI 11 | 12 | enum Animation { 13 | 14 | case first (CGFloat) 15 | case second (CGFloat) 16 | case third (CGFloat) 17 | 18 | mutating func next() { 19 | switch self { 20 | case .first: 21 | self = .second(120) 22 | case .second: 23 | self = .third(100) 24 | case .third: 25 | self = .first(180) 26 | } 27 | } 28 | 29 | var resize: CGFloat { 30 | switch self { 31 | case .first(let resize), 32 | .second(let resize), 33 | .third(let resize) : 34 | return resize 35 | } 36 | } 37 | 38 | var isSecond: Bool { 39 | switch self { 40 | case .second: 41 | return true 42 | default: 43 | return false 44 | } 45 | } 46 | 47 | var isThird: Bool { 48 | switch self { 49 | case .third: 50 | return true 51 | default: 52 | return false 53 | } 54 | } 55 | } 56 | 57 | struct SquareAnimate: View { 58 | @Binding var Height: CGFloat 59 | @Binding var heightSecond: CGFloat 60 | 61 | @State var animation: Animation = .first(200) 62 | 63 | var body: some View { 64 | 65 | ZStack { 66 | 67 | RoundedRectangle(cornerRadius: 2, style: .circular) 68 | .frame(width: 30, height: 25) 69 | .foregroundColor(.black) 70 | //.cornerRadius(5) 71 | 72 | Rectangle() 73 | .frame(width: 30, height: 2) 74 | .offset(x: animation.isSecond ? 0 : 30) 75 | Rectangle() 76 | .frame(width: 2, height: 20) 77 | .offset(y: animation.isSecond ? 0 : 25) 78 | 79 | Rectangle() 80 | .frame(width: 2, height: 20) 81 | .offset(x: 5, y: animation.isThird ? 0 : 25) 82 | Rectangle() 83 | .frame(width: 2, height: 20) 84 | .offset(x: -5, y: animation.isThird ? 0 : -25) 85 | 86 | Rectangle() 87 | .frame(width: 30, height: 2) 88 | .offset(x: animation.isThird ? 0 : 30) 89 | 90 | } 91 | .clipped() 92 | .mask({ 93 | RoundedRectangle(cornerRadius: 5, style: .continuous) 94 | }) 95 | .foregroundColor(.white) 96 | .onTapGesture { 97 | withAnimation { 98 | animation.next() 99 | Height = animation.resize 100 | if Height == 200 { 101 | heightSecond = 200 102 | } else if Height == 120 { 103 | heightSecond = 150 104 | } else { 105 | heightSecond = 120 106 | } 107 | } 108 | } 109 | } 110 | } 111 | 112 | #Preview { 113 | SquareAnimate(Height: .constant(200), heightSecond: .constant(200)) 114 | } 115 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ⌨️ Dynamic LazyVGrid. 2 | ========= 3 | 4 | - Performance & Flexibility: SwiftUI's dynamic LazyVGrid offers top-notch performance and flexibility. It efficiently handles large datasets while allowing easy customization of column sizes and counts. 5 | 6 | - Aesthetics & Responsiveness: With its sleek design, the grid enhances the app's visual appeal. Plus, it seamlessly adapts to different screen sizes and orientations, ensuring a smooth user experience. 7 | 8 | - Elevate Your Designs: Mastering LazyVGrid empowers developers to create responsive, intuitive, and visually stunning interfaces. Take your SwiftUI projects to the next level with this versatile component! 9 | 10 | https://github.com/Elaidzha1940/DynamicLazyVGrid/assets/64445918/d3875bca-c6a3-4f20-9779-ebf05a1f56b2 11 | 12 | ---------- 13 | --------------------------------------------------------------------------------