├── ExpandingCollectionView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── VamshiKrishna.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── VamshiKrishna.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── ExpandingCollectionView.xcscheme │ └── xcschememanagement.plist └── ExpandingCollectionView ├── AppDelegate.swift ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json └── pattern-grey.imageset │ ├── Contents.json │ ├── pattern-grey.png │ ├── pattern-grey@2x.png │ └── pattern-grey@3x.png ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── Inspiration.swift ├── InspirationCell.swift ├── Inspirations.plist ├── Inspirations.xcassets ├── Contents.json ├── Inspiration-1.imageset │ ├── Contents.json │ └── Tutorial-1.jpg ├── Inspiration-10.imageset │ ├── Contents.json │ └── Tutorial-10.jpg ├── Inspiration-11.imageset │ ├── Contents.json │ └── Tutorial-11.jpg ├── Inspiration-12.imageset │ ├── Contents.json │ └── Tutorial-12.jpg ├── Inspiration-13.imageset │ ├── Contents.json │ └── Tutorial-13.jpg ├── Inspiration-14.imageset │ ├── Contents.json │ └── Tutorial-14.jpg ├── Inspiration-15.imageset │ ├── Contents.json │ └── Tutorial-15.jpg ├── Inspiration-16.imageset │ ├── Contents.json │ └── Tutorial-16.jpg ├── Inspiration-2.imageset │ ├── Contents.json │ └── Tutorial-2.jpg ├── Inspiration-3.imageset │ ├── Contents.json │ └── Tutorial-3.jpg ├── Inspiration-4.imageset │ ├── Contents.json │ └── Tutorial-4.jpg ├── Inspiration-5.imageset │ ├── Contents.json │ └── Tutorial-5.jpg ├── Inspiration-6.imageset │ ├── Contents.json │ └── Tutorial-6.jpg ├── Inspiration-7.imageset │ ├── Contents.json │ └── Tutorial-7.jpg ├── Inspiration-8.imageset │ ├── Contents.json │ └── Tutorial-8.jpg └── Inspiration-9.imageset │ ├── Contents.json │ └── Tutorial-9.jpg ├── InspirationsViewController.swift ├── Session.swift ├── UIColor+Palette.swift ├── UIImage+Decompression.swift └── UltravisualLayout.swift /ExpandingCollectionView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 9641314F1EB62010009B2648 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9641314E1EB62010009B2648 /* Session.swift */; }; 11 | 964131531EB6241A009B2648 /* UIColor+Palette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964131521EB6241A009B2648 /* UIColor+Palette.swift */; }; 12 | 964131551EB624C2009B2648 /* UIImage+Decompression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964131541EB624C2009B2648 /* UIImage+Decompression.swift */; }; 13 | 964131581EB625C9009B2648 /* Inspiration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964131571EB625C9009B2648 /* Inspiration.swift */; }; 14 | 964131621EB628A1009B2648 /* UltravisualLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964131611EB628A1009B2648 /* UltravisualLayout.swift */; }; 15 | 964131641EB62B0D009B2648 /* InspirationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964131631EB62B0D009B2648 /* InspirationsViewController.swift */; }; 16 | 96C6139A1EB61BA1005331C3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C613991EB61BA1005331C3 /* AppDelegate.swift */; }; 17 | 96C6139F1EB61BA1005331C3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96C6139D1EB61BA1005331C3 /* Main.storyboard */; }; 18 | 96C613A11EB61BA1005331C3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96C613A01EB61BA1005331C3 /* Assets.xcassets */; }; 19 | 96C613A41EB61BA1005331C3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96C613A21EB61BA1005331C3 /* LaunchScreen.storyboard */; }; 20 | 96C613AC1EB61BCD005331C3 /* InspirationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C613AB1EB61BCD005331C3 /* InspirationCell.swift */; }; 21 | 96C613B01EB61C83005331C3 /* Inspirations.plist in Resources */ = {isa = PBXBuildFile; fileRef = 96C613AF1EB61C83005331C3 /* Inspirations.plist */; }; 22 | 96C613B21EB61E69005331C3 /* Inspirations.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96C613B11EB61E69005331C3 /* Inspirations.xcassets */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 9641314E1EB62010009B2648 /* Session.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Session.swift; sourceTree = ""; }; 27 | 964131521EB6241A009B2648 /* UIColor+Palette.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Palette.swift"; sourceTree = ""; }; 28 | 964131541EB624C2009B2648 /* UIImage+Decompression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Decompression.swift"; sourceTree = ""; }; 29 | 964131571EB625C9009B2648 /* Inspiration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Inspiration.swift; sourceTree = ""; }; 30 | 964131611EB628A1009B2648 /* UltravisualLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UltravisualLayout.swift; sourceTree = ""; }; 31 | 964131631EB62B0D009B2648 /* InspirationsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InspirationsViewController.swift; sourceTree = ""; }; 32 | 96C613961EB61BA1005331C3 /* ExpandingCollectionView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExpandingCollectionView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 96C613991EB61BA1005331C3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | 96C6139E1EB61BA1005331C3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 35 | 96C613A01EB61BA1005331C3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 36 | 96C613A31EB61BA1005331C3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 37 | 96C613A51EB61BA1005331C3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 38 | 96C613AB1EB61BCD005331C3 /* InspirationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InspirationCell.swift; sourceTree = ""; }; 39 | 96C613AF1EB61C83005331C3 /* Inspirations.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Inspirations.plist; sourceTree = ""; }; 40 | 96C613B11EB61E69005331C3 /* Inspirations.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Inspirations.xcassets; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | 96C613931EB61BA1005331C3 /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | 9641314D1EB61FD9009B2648 /* Models */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | 9641314E1EB62010009B2648 /* Session.swift */, 58 | 964131571EB625C9009B2648 /* Inspiration.swift */, 59 | ); 60 | name = Models; 61 | sourceTree = ""; 62 | }; 63 | 964131561EB62573009B2648 /* Extensions */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 964131521EB6241A009B2648 /* UIColor+Palette.swift */, 67 | 964131541EB624C2009B2648 /* UIImage+Decompression.swift */, 68 | ); 69 | name = Extensions; 70 | sourceTree = ""; 71 | }; 72 | 964131591EB62674009B2648 /* Views */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 96C613AB1EB61BCD005331C3 /* InspirationCell.swift */, 76 | ); 77 | name = Views; 78 | sourceTree = ""; 79 | }; 80 | 9641315B1EB62697009B2648 /* Supporting Files */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 96C613A51EB61BA1005331C3 /* Info.plist */, 84 | ); 85 | name = "Supporting Files"; 86 | sourceTree = ""; 87 | }; 88 | 9641315C1EB626B6009B2648 /* Assets */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 96C613A01EB61BA1005331C3 /* Assets.xcassets */, 92 | 96C613AF1EB61C83005331C3 /* Inspirations.plist */, 93 | 96C613B11EB61E69005331C3 /* Inspirations.xcassets */, 94 | ); 95 | name = Assets; 96 | sourceTree = ""; 97 | }; 98 | 9641315E1EB62771009B2648 /* Other */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 96C613991EB61BA1005331C3 /* AppDelegate.swift */, 102 | ); 103 | name = Other; 104 | sourceTree = ""; 105 | }; 106 | 96C6138D1EB61BA1005331C3 = { 107 | isa = PBXGroup; 108 | children = ( 109 | 96C613981EB61BA1005331C3 /* ExpandingCollectionView */, 110 | 96C613971EB61BA1005331C3 /* Products */, 111 | ); 112 | sourceTree = ""; 113 | }; 114 | 96C613971EB61BA1005331C3 /* Products */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 96C613961EB61BA1005331C3 /* ExpandingCollectionView.app */, 118 | ); 119 | name = Products; 120 | sourceTree = ""; 121 | }; 122 | 96C613981EB61BA1005331C3 /* ExpandingCollectionView */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 9641315E1EB62771009B2648 /* Other */, 126 | 9641315C1EB626B6009B2648 /* Assets */, 127 | 9641315B1EB62697009B2648 /* Supporting Files */, 128 | 964131591EB62674009B2648 /* Views */, 129 | 964131561EB62573009B2648 /* Extensions */, 130 | 9641314D1EB61FD9009B2648 /* Models */, 131 | 96C6139D1EB61BA1005331C3 /* Main.storyboard */, 132 | 96C613A21EB61BA1005331C3 /* LaunchScreen.storyboard */, 133 | 964131611EB628A1009B2648 /* UltravisualLayout.swift */, 134 | 964131631EB62B0D009B2648 /* InspirationsViewController.swift */, 135 | ); 136 | path = ExpandingCollectionView; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 96C613951EB61BA1005331C3 /* ExpandingCollectionView */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 96C613A81EB61BA1005331C3 /* Build configuration list for PBXNativeTarget "ExpandingCollectionView" */; 145 | buildPhases = ( 146 | 96C613921EB61BA1005331C3 /* Sources */, 147 | 96C613931EB61BA1005331C3 /* Frameworks */, 148 | 96C613941EB61BA1005331C3 /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | ); 154 | name = ExpandingCollectionView; 155 | productName = ExpandingCollectionView; 156 | productReference = 96C613961EB61BA1005331C3 /* ExpandingCollectionView.app */; 157 | productType = "com.apple.product-type.application"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | 96C6138E1EB61BA1005331C3 /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastSwiftUpdateCheck = 0830; 166 | LastUpgradeCheck = 0830; 167 | ORGANIZATIONNAME = VamshiKrishna; 168 | TargetAttributes = { 169 | 96C613951EB61BA1005331C3 = { 170 | CreatedOnToolsVersion = 8.3.1; 171 | DevelopmentTeam = BJBC582Q56; 172 | ProvisioningStyle = Automatic; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = 96C613911EB61BA1005331C3 /* Build configuration list for PBXProject "ExpandingCollectionView" */; 177 | compatibilityVersion = "Xcode 3.2"; 178 | developmentRegion = English; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = 96C6138D1EB61BA1005331C3; 185 | productRefGroup = 96C613971EB61BA1005331C3 /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 96C613951EB61BA1005331C3 /* ExpandingCollectionView */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 96C613941EB61BA1005331C3 /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 96C613A41EB61BA1005331C3 /* LaunchScreen.storyboard in Resources */, 200 | 96C613A11EB61BA1005331C3 /* Assets.xcassets in Resources */, 201 | 96C6139F1EB61BA1005331C3 /* Main.storyboard in Resources */, 202 | 96C613B21EB61E69005331C3 /* Inspirations.xcassets in Resources */, 203 | 96C613B01EB61C83005331C3 /* Inspirations.plist in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXSourcesBuildPhase section */ 210 | 96C613921EB61BA1005331C3 /* Sources */ = { 211 | isa = PBXSourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 9641314F1EB62010009B2648 /* Session.swift in Sources */, 215 | 964131551EB624C2009B2648 /* UIImage+Decompression.swift in Sources */, 216 | 964131641EB62B0D009B2648 /* InspirationsViewController.swift in Sources */, 217 | 96C613AC1EB61BCD005331C3 /* InspirationCell.swift in Sources */, 218 | 964131621EB628A1009B2648 /* UltravisualLayout.swift in Sources */, 219 | 96C6139A1EB61BA1005331C3 /* AppDelegate.swift in Sources */, 220 | 964131581EB625C9009B2648 /* Inspiration.swift in Sources */, 221 | 964131531EB6241A009B2648 /* UIColor+Palette.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXSourcesBuildPhase section */ 226 | 227 | /* Begin PBXVariantGroup section */ 228 | 96C6139D1EB61BA1005331C3 /* Main.storyboard */ = { 229 | isa = PBXVariantGroup; 230 | children = ( 231 | 96C6139E1EB61BA1005331C3 /* Base */, 232 | ); 233 | name = Main.storyboard; 234 | sourceTree = ""; 235 | }; 236 | 96C613A21EB61BA1005331C3 /* LaunchScreen.storyboard */ = { 237 | isa = PBXVariantGroup; 238 | children = ( 239 | 96C613A31EB61BA1005331C3 /* Base */, 240 | ); 241 | name = LaunchScreen.storyboard; 242 | sourceTree = ""; 243 | }; 244 | /* End PBXVariantGroup section */ 245 | 246 | /* Begin XCBuildConfiguration section */ 247 | 96C613A61EB61BA1005331C3 /* Debug */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | CLANG_ANALYZER_NONNULL = YES; 252 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_ENABLE_MODULES = YES; 256 | CLANG_ENABLE_OBJC_ARC = YES; 257 | CLANG_WARN_BOOL_CONVERSION = YES; 258 | CLANG_WARN_CONSTANT_CONVERSION = YES; 259 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 260 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 261 | CLANG_WARN_EMPTY_BODY = YES; 262 | CLANG_WARN_ENUM_CONVERSION = YES; 263 | CLANG_WARN_INFINITE_RECURSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 267 | CLANG_WARN_UNREACHABLE_CODE = YES; 268 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 269 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 270 | COPY_PHASE_STRIP = NO; 271 | DEBUG_INFORMATION_FORMAT = dwarf; 272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 273 | ENABLE_TESTABILITY = YES; 274 | GCC_C_LANGUAGE_STANDARD = gnu99; 275 | GCC_DYNAMIC_NO_PIC = NO; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_OPTIMIZATION_LEVEL = 0; 278 | GCC_PREPROCESSOR_DEFINITIONS = ( 279 | "DEBUG=1", 280 | "$(inherited)", 281 | ); 282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 284 | GCC_WARN_UNDECLARED_SELECTOR = YES; 285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 286 | GCC_WARN_UNUSED_FUNCTION = YES; 287 | GCC_WARN_UNUSED_VARIABLE = YES; 288 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 289 | MTL_ENABLE_DEBUG_INFO = YES; 290 | ONLY_ACTIVE_ARCH = YES; 291 | SDKROOT = iphoneos; 292 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 293 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 294 | }; 295 | name = Debug; 296 | }; 297 | 96C613A71EB61BA1005331C3 /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | CLANG_ANALYZER_NONNULL = YES; 302 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 303 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_ENABLE_MODULES = YES; 306 | CLANG_ENABLE_OBJC_ARC = YES; 307 | CLANG_WARN_BOOL_CONVERSION = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 310 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 311 | CLANG_WARN_EMPTY_BODY = YES; 312 | CLANG_WARN_ENUM_CONVERSION = YES; 313 | CLANG_WARN_INFINITE_RECURSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 316 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 317 | CLANG_WARN_UNREACHABLE_CODE = YES; 318 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 319 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 320 | COPY_PHASE_STRIP = NO; 321 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 322 | ENABLE_NS_ASSERTIONS = NO; 323 | ENABLE_STRICT_OBJC_MSGSEND = YES; 324 | GCC_C_LANGUAGE_STANDARD = gnu99; 325 | GCC_NO_COMMON_BLOCKS = YES; 326 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 327 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 328 | GCC_WARN_UNDECLARED_SELECTOR = YES; 329 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 330 | GCC_WARN_UNUSED_FUNCTION = YES; 331 | GCC_WARN_UNUSED_VARIABLE = YES; 332 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 333 | MTL_ENABLE_DEBUG_INFO = NO; 334 | SDKROOT = iphoneos; 335 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 336 | VALIDATE_PRODUCT = YES; 337 | }; 338 | name = Release; 339 | }; 340 | 96C613A91EB61BA1005331C3 /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 344 | DEVELOPMENT_TEAM = BJBC582Q56; 345 | INFOPLIST_FILE = ExpandingCollectionView/Info.plist; 346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 347 | PRODUCT_BUNDLE_IDENTIFIER = VamshiKrishna.ExpandingCollectionView; 348 | PRODUCT_NAME = "$(TARGET_NAME)"; 349 | SWIFT_VERSION = 3.0; 350 | }; 351 | name = Debug; 352 | }; 353 | 96C613AA1EB61BA1005331C3 /* Release */ = { 354 | isa = XCBuildConfiguration; 355 | buildSettings = { 356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 357 | DEVELOPMENT_TEAM = BJBC582Q56; 358 | INFOPLIST_FILE = ExpandingCollectionView/Info.plist; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 360 | PRODUCT_BUNDLE_IDENTIFIER = VamshiKrishna.ExpandingCollectionView; 361 | PRODUCT_NAME = "$(TARGET_NAME)"; 362 | SWIFT_VERSION = 3.0; 363 | }; 364 | name = Release; 365 | }; 366 | /* End XCBuildConfiguration section */ 367 | 368 | /* Begin XCConfigurationList section */ 369 | 96C613911EB61BA1005331C3 /* Build configuration list for PBXProject "ExpandingCollectionView" */ = { 370 | isa = XCConfigurationList; 371 | buildConfigurations = ( 372 | 96C613A61EB61BA1005331C3 /* Debug */, 373 | 96C613A71EB61BA1005331C3 /* Release */, 374 | ); 375 | defaultConfigurationIsVisible = 0; 376 | defaultConfigurationName = Release; 377 | }; 378 | 96C613A81EB61BA1005331C3 /* Build configuration list for PBXNativeTarget "ExpandingCollectionView" */ = { 379 | isa = XCConfigurationList; 380 | buildConfigurations = ( 381 | 96C613A91EB61BA1005331C3 /* Debug */, 382 | 96C613AA1EB61BA1005331C3 /* Release */, 383 | ); 384 | defaultConfigurationIsVisible = 0; 385 | defaultConfigurationName = Release; 386 | }; 387 | /* End XCConfigurationList section */ 388 | }; 389 | rootObject = 96C6138E1EB61BA1005331C3 /* Project object */; 390 | } 391 | -------------------------------------------------------------------------------- /ExpandingCollectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ExpandingCollectionView.xcodeproj/project.xcworkspace/xcuserdata/VamshiKrishna.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView.xcodeproj/project.xcworkspace/xcuserdata/VamshiKrishna.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ExpandingCollectionView.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ExpandingCollectionView.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcschemes/ExpandingCollectionView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ExpandingCollectionView.xcodeproj/xcuserdata/VamshiKrishna.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ExpandingCollectionView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 96C613951EB61BA1005331C3 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ExpandingCollectionView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /ExpandingCollectionView/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 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "pattern-grey.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "pattern-grey@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "pattern-grey@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey.png -------------------------------------------------------------------------------- /ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey@2x.png -------------------------------------------------------------------------------- /ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Assets.xcassets/pattern-grey.imageset/pattern-grey@3x.png -------------------------------------------------------------------------------- /ExpandingCollectionView/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 | 27 | 28 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Base.lproj/Main.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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspiration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Inspiration.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class Inspiration:Session{ 13 | class func allInspirations() -> [Inspiration] { 14 | var inspirations = [Inspiration]() 15 | if let URL = Bundle.main.url(forResource: "Inspirations", withExtension: "plist") { 16 | if let tutorialsFromPlist = NSArray(contentsOf: URL) { 17 | for dictionary in tutorialsFromPlist { 18 | let inspiration = Inspiration(dictionary: dictionary as! NSDictionary) 19 | inspirations.append(inspiration) 20 | } 21 | } 22 | } 23 | return inspirations 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ExpandingCollectionView/InspirationCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InspirationCell.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class InspirationCell: UICollectionViewCell { 12 | 13 | @IBOutlet fileprivate weak var imageView: UIImageView! 14 | @IBOutlet fileprivate weak var imageCoverView: UIView! 15 | @IBOutlet private weak var titleLabel: UILabel! 16 | @IBOutlet private weak var timeAndRoomLabel: UILabel! 17 | @IBOutlet private weak var speakerLabel: UILabel! 18 | 19 | var inspiration:Inspiration?{ 20 | didSet{ 21 | if let inspiration = inspiration{ 22 | imageView.image = inspiration.backgroundImage 23 | titleLabel.text = inspiration.title 24 | timeAndRoomLabel.text = inspiration.roomAndTime 25 | speakerLabel.text = inspiration.speaker 26 | } 27 | } 28 | } 29 | override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) { 30 | super.apply(layoutAttributes) 31 | 32 | // 1 33 | let standardHeight = UltravisualLayoutConstants.Cell.standardHeight 34 | let featuredHeight = UltravisualLayoutConstants.Cell.featuredHeight 35 | 36 | // 2 37 | let delta = 1 - ((featuredHeight - frame.height) / (featuredHeight - standardHeight)) 38 | 39 | // 3 40 | let minAlpha: CGFloat = 0.3 41 | let maxAlpha: CGFloat = 0.75 42 | imageCoverView.alpha = maxAlpha - (delta * (maxAlpha - minAlpha)) 43 | timeAndRoomLabel.alpha = delta 44 | speakerLabel.alpha = delta 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Time 7 | Feb 6, 4:45 8 | Speaker 9 | Tammy Coron 10 | Title 11 | Possibility 12 | Room 13 | The Hill 14 | Background 15 | Inspiration-1 16 | 17 | 18 | Time 19 | Feb 6, 4:45 20 | Speaker 21 | Kim Pedersen 22 | Title 23 | Finishing 24 | Room 25 | The Grid 26 | Background 27 | Inspiration-2 28 | 29 | 30 | Time 31 | Feb 6, 4:45 32 | Speaker 33 | Chris Wagner 34 | Title 35 | Craftsmanship 36 | Room 37 | Metropolitan Center 38 | Background 39 | Inspiration-3 40 | 41 | 42 | Time 43 | Feb 6, 4:45 44 | Speaker 45 | Chris Wagner 46 | Title 47 | Craftsmanship 48 | Room 49 | Metropolitan Center 50 | Background 51 | Inspiration-4 52 | 53 | 54 | Time 55 | Feb 6, 5:15 56 | Speaker 57 | Jake Gundersen 58 | Title 59 | Opportunity 60 | Room 61 | The Hill 62 | Background 63 | Inspiration-5 64 | 65 | 66 | Time 67 | Feb 6, 5:15 68 | Speaker 69 | Ellen Shapiro 70 | Title 71 | Starting Over 72 | Room 73 | The Grid 74 | Background 75 | Inspiration-6 76 | 77 | 78 | Time 79 | Feb 6, 5:15 80 | Speaker 81 | Vicki Wenderlich 82 | Title 83 | Identity I 84 | Room 85 | Metropolitan Center 86 | Background 87 | Inspiration-7 88 | 89 | 90 | Time 91 | Feb 6, 5:45 92 | Speaker 93 | Ryan Nystrom 94 | Title 95 | Contributing 96 | Room 97 | The Hill 98 | Background 99 | Inspiration-8 100 | 101 | 102 | Time 103 | Feb 6, 5:45 104 | Speaker 105 | Brian Moakley 106 | Title 107 | Commitment 108 | Room 109 | The Grid 110 | Background 111 | Inspiration-9 112 | 113 | 114 | Time 115 | Feb 6, 5:45 116 | Speaker 117 | Alexis Gallagher 118 | Title 119 | Identity II 120 | Room 121 | Metropolitan Center 122 | Background 123 | Inspiration-10 124 | 125 | 126 | Time 127 | Feb 7, 3:45 128 | Speaker 129 | Cesare Rocchi 130 | Title 131 | Business 132 | Room 133 | The Hill 134 | Background 135 | Inspiration-11 136 | 137 | 138 | Time 139 | Feb 7, 3:45 140 | Speaker 141 | Ricardo Rendon Cepeda 142 | Title 143 | Devsign 144 | Room 145 | The Grid 146 | Background 147 | Inspiration-12 148 | 149 | 150 | Time 151 | Feb 7, 3:45 152 | Speaker 153 | Marin Todorov 154 | Title 155 | Folklore 156 | Room 157 | Metropolitan Center 158 | Background 159 | Inspiration-13 160 | 161 | 162 | Time 163 | Feb 7, 4:15 164 | Speaker 165 | Matthijs Hollemans 166 | Title 167 | Math Isn't Hard 168 | Room 169 | The Hill 170 | Background 171 | Inspiration-14 172 | 173 | 174 | Time 175 | Feb 7, 4:15 176 | Speaker 177 | Cesare Rocchi 178 | Title 179 | Cognition 180 | Room 181 | The Grid 182 | Background 183 | Inspiration-15 184 | 185 | 186 | Time 187 | Feb 7, 4:15 188 | Speaker 189 | Saul Mora 190 | Title 191 | NSBrief 192 | Room 193 | Metropolitan Center 194 | Background 195 | Inspiration-16 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-1.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-1.imageset/Tutorial-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-1.imageset/Tutorial-1.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-10.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-10.imageset/Tutorial-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-10.imageset/Tutorial-10.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-11.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-11.imageset/Tutorial-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-11.imageset/Tutorial-11.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-12.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-12.imageset/Tutorial-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-12.imageset/Tutorial-12.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-13.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-13.imageset/Tutorial-13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-13.imageset/Tutorial-13.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-14.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-14.imageset/Tutorial-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-14.imageset/Tutorial-14.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-15.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-15.imageset/Tutorial-15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-15.imageset/Tutorial-15.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-16.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-16.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-16.imageset/Tutorial-16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-16.imageset/Tutorial-16.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-2.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-2.imageset/Tutorial-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-2.imageset/Tutorial-2.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-3.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-3.imageset/Tutorial-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-3.imageset/Tutorial-3.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-4.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-4.imageset/Tutorial-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-4.imageset/Tutorial-4.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-5.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-5.imageset/Tutorial-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-5.imageset/Tutorial-5.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-6.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-6.imageset/Tutorial-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-6.imageset/Tutorial-6.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-7.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-7.imageset/Tutorial-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-7.imageset/Tutorial-7.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-8.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-8.imageset/Tutorial-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-8.imageset/Tutorial-8.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Tutorial-9.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ExpandingCollectionView/Inspirations.xcassets/Inspiration-9.imageset/Tutorial-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VamshiIITBHU14/ExpandingCollectionView/7a0aa2545c1ed5581a2afc469b1c8de75b9c41c1/ExpandingCollectionView/Inspirations.xcassets/Inspiration-9.imageset/Tutorial-9.jpg -------------------------------------------------------------------------------- /ExpandingCollectionView/InspirationsViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InspirationsViewController.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | private let reuseIdentifier = "Cell" 12 | 13 | class InspirationsViewController: UICollectionViewController { 14 | 15 | let inspirations = Inspiration.allInspirations() 16 | 17 | override var preferredStatusBarStyle : UIStatusBarStyle { 18 | return UIStatusBarStyle.lightContent 19 | } 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | 24 | if let patternImage = UIImage(named: "Pattern") { 25 | view.backgroundColor = UIColor(patternImage: patternImage) 26 | } 27 | collectionView!.backgroundColor = UIColor.clear 28 | collectionView!.decelerationRate = UIScrollViewDecelerationRateFast 29 | } 30 | 31 | } 32 | 33 | extension InspirationsViewController { 34 | 35 | override func numberOfSections(in collectionView: UICollectionView) -> Int { 36 | return 1 37 | } 38 | 39 | override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 40 | return inspirations.count 41 | } 42 | 43 | override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 44 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "InspirationCell", for: indexPath) as! InspirationCell 45 | cell.inspiration = inspirations[indexPath.item] 46 | return cell 47 | } 48 | 49 | override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { 50 | let layout = collectionViewLayout as! UltravisualLayout 51 | let offset = layout.dragOffset * CGFloat(indexPath.item) 52 | if collectionView.contentOffset.y != offset { 53 | collectionView.setContentOffset(CGPoint(x: 0, y: offset), animated: true) 54 | } 55 | } 56 | 57 | 58 | } 59 | -------------------------------------------------------------------------------- /ExpandingCollectionView/Session.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Session.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class Session{ 13 | 14 | var title: String 15 | var speaker: String 16 | var room: String 17 | var time: String 18 | var backgroundImage: UIImage 19 | 20 | var roomAndTime:String{ 21 | get{ 22 | return "\(time) • \(room)" 23 | } 24 | } 25 | 26 | init(title:String, speaker:String, room:String, time:String, backgroundImage:UIImage){ 27 | self.title = title 28 | self.speaker = speaker 29 | self.room = room 30 | self.time = time 31 | self.backgroundImage = backgroundImage 32 | } 33 | 34 | convenience init (dictionary:NSDictionary){ 35 | let title = dictionary["Title"] as? String 36 | let speaker = dictionary["Speaker"] as? String 37 | let room = dictionary["Room"] as? String 38 | let time = dictionary["Time"] as? String 39 | let backgroundName = dictionary["Background"] as? String 40 | let backgroundImage = UIImage.init(named: backgroundName!) 41 | 42 | self.init(title: title!, speaker: speaker!, room: room!, time: time!, backgroundImage: (backgroundImage?.decompressedImage)!) 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /ExpandingCollectionView/UIColor+Palette.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Palette.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIColor{ 13 | class func colorFromRGB(_ r: Int, g: Int, b: Int) -> UIColor { 14 | return UIColor(red: CGFloat(Float(r) / 255), green: CGFloat(Float(g) / 255), blue: CGFloat(Float(b) / 255), alpha: 1) 15 | } 16 | 17 | class func palette() -> [UIColor]{ 18 | let palette = [ 19 | UIColor.colorFromRGB(85, g: 0, b: 255), 20 | UIColor.colorFromRGB(170, g: 0, b: 170), 21 | UIColor.colorFromRGB(85, g: 170, b: 85), 22 | UIColor.colorFromRGB(0, g: 85, b: 0), 23 | 24 | UIColor.colorFromRGB(255, g: 170, b: 0), 25 | UIColor.colorFromRGB(255, g: 255, b: 0), 26 | UIColor.colorFromRGB(255, g: 85, b: 0), 27 | UIColor.colorFromRGB(0, g: 85, b: 85), 28 | 29 | UIColor.colorFromRGB(0, g: 85, b: 255), 30 | UIColor.colorFromRGB(170, g: 170, b: 255), 31 | UIColor.colorFromRGB(85, g: 0, b: 0), 32 | UIColor.colorFromRGB(170, g: 85, b: 85), 33 | 34 | UIColor.colorFromRGB(170, g: 255, b: 0), 35 | UIColor.colorFromRGB(85, g: 170, b: 255), 36 | UIColor.colorFromRGB(0, g: 170, b: 170), 37 | UIColor.colorFromRGB(0, g: 139, b: 210) 38 | ] 39 | return palette 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /ExpandingCollectionView/UIImage+Decompression.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Decompression.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | extension UIImage{ 13 | 14 | var decompressedImage:UIImage{ 15 | UIGraphicsBeginImageContextWithOptions(size, true, 0) 16 | draw(at: CGPoint.zero) 17 | let decompressedImage = UIGraphicsGetImageFromCurrentImageContext() 18 | UIGraphicsEndImageContext() 19 | return decompressedImage! 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ExpandingCollectionView/UltravisualLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UltravisualLayout.swift 3 | // ExpandingCollectionView 4 | // 5 | // Created by Vamshi Krishna on 30/04/17. 6 | // Copyright © 2017 VamshiKrishna. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /* The heights are declared as constants outside of the class so they can be easily referenced elsewhere */ 13 | struct UltravisualLayoutConstants { 14 | struct Cell { 15 | /* The height of the non-featured cell */ 16 | static let standardHeight: CGFloat = 100 17 | /* The height of the first visible cell */ 18 | static let featuredHeight: CGFloat = 280 19 | } 20 | } 21 | 22 | class UltravisualLayout:UICollectionViewLayout{ 23 | 24 | // MARK: Properties and Variables 25 | 26 | /* The amount the user needs to scroll before the featured cell changes */ 27 | let dragOffset: CGFloat = 180.0 28 | 29 | var cache = [UICollectionViewLayoutAttributes]() 30 | 31 | /* Returns the item index of the currently featured cell */ 32 | var featuredItemIndex: Int { 33 | get { 34 | /* Use max to make sure the featureItemIndex is never < 0 */ 35 | return max(0, Int(collectionView!.contentOffset.y / dragOffset)) 36 | } 37 | } 38 | 39 | /* Returns a value between 0 and 1 that represents how close the next cell is to becoming the featured cell */ 40 | var nextItemPercentageOffset: CGFloat { 41 | get { 42 | return (collectionView!.contentOffset.y / dragOffset) - CGFloat(featuredItemIndex) 43 | } 44 | } 45 | 46 | /* Returns the width of the collection view */ 47 | var width: CGFloat { 48 | get { 49 | return collectionView!.bounds.width 50 | } 51 | } 52 | 53 | /* Returns the height of the collection view */ 54 | var height: CGFloat { 55 | get { 56 | return collectionView!.bounds.height 57 | } 58 | } 59 | 60 | /* Returns the number of items in the collection view */ 61 | var numberOfItems: Int { 62 | get { 63 | return collectionView!.numberOfItems(inSection: 0) 64 | } 65 | } 66 | 67 | // MARK: UICollectionViewLayout 68 | 69 | /* Return the size of all the content in the collection view */ 70 | 71 | override var collectionViewContentSize: CGSize{ 72 | let contentHeight = (CGFloat(numberOfItems) * dragOffset) + (height - dragOffset) 73 | return CGSize(width: width, height: contentHeight) 74 | } 75 | 76 | override func prepare() { 77 | cache.removeAll(keepingCapacity: false) 78 | let standardHeight = UltravisualLayoutConstants.Cell.standardHeight 79 | let featuredHeight = UltravisualLayoutConstants.Cell.featuredHeight 80 | 81 | var frame = CGRect.zero 82 | var y: CGFloat = 0 83 | 84 | for item in 0.. [UICollectionViewLayoutAttributes]? { 116 | var layoutAttributes = [UICollectionViewLayoutAttributes]() 117 | for attributes in cache { 118 | if attributes.frame.intersects(rect) { 119 | layoutAttributes.append(attributes) 120 | } 121 | } 122 | return layoutAttributes 123 | } 124 | /* Return true so that the layout is continuously invalidated as the user scrolls */ 125 | override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { 126 | return true 127 | } 128 | 129 | override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint { 130 | let itemIndex = round(proposedContentOffset.y / dragOffset) 131 | let yOffset = itemIndex * dragOffset 132 | return CGPoint(x: 0, y: yOffset) 133 | } 134 | } 135 | --------------------------------------------------------------------------------