├── GithubImages └── videoGrid.gif ├── README.md ├── TwoDirectionalScroller.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── TwoDirectionalScroller.xccheckout └── xcuserdata │ └── robertchen.xcuserdatad │ └── xcschemes │ ├── TwoDirectionalScroller.xcscheme │ └── xcschememanagement.plist ├── TwoDirectionalScroller ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── CategoryRow.swift ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── VideoCell.swift └── ViewController.swift └── TwoDirectionalScrollerTests ├── Info.plist └── TwoDirectionalScrollerTests.swift /GithubImages/videoGrid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThornTechPublic/HorizontalScrollingCollectionView/8836ed11a9bbaf24017e7b8a2aa5abdbab706268/GithubImages/videoGrid.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Netflix style independent scrolling 2 | 3 | Sample project for a tutorial on nesting UICollectionView inside UITableView 4 | 5 | ![animated gif demo](https://github.com/ThornTechPublic/HorizontalScrollingCollectionView/blob/master/GithubImages/videoGrid.gif) 6 | -------------------------------------------------------------------------------- /TwoDirectionalScroller.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FCC4C7811B51BA41008CD338 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC4C7801B51BA41008CD338 /* AppDelegate.swift */; }; 11 | FCC4C7831B51BA41008CD338 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC4C7821B51BA41008CD338 /* ViewController.swift */; }; 12 | FCC4C7861B51BA41008CD338 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FCC4C7841B51BA41008CD338 /* Main.storyboard */; }; 13 | FCC4C7881B51BA41008CD338 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FCC4C7871B51BA41008CD338 /* Images.xcassets */; }; 14 | FCC4C78B1B51BA41008CD338 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = FCC4C7891B51BA41008CD338 /* LaunchScreen.xib */; }; 15 | FCC4C7971B51BA41008CD338 /* TwoDirectionalScrollerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC4C7961B51BA41008CD338 /* TwoDirectionalScrollerTests.swift */; }; 16 | FCC4C7A11B51BAC4008CD338 /* CategoryRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC4C7A01B51BAC4008CD338 /* CategoryRow.swift */; }; 17 | FCC4C7A31B51BBF0008CD338 /* VideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCC4C7A21B51BBF0008CD338 /* VideoCell.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | FCC4C7911B51BA41008CD338 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = FCC4C7731B51BA41008CD338 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = FCC4C77A1B51BA41008CD338; 26 | remoteInfo = TwoDirectionalScroller; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | FCC4C77B1B51BA41008CD338 /* TwoDirectionalScroller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TwoDirectionalScroller.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | FCC4C77F1B51BA41008CD338 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | FCC4C7801B51BA41008CD338 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | FCC4C7821B51BA41008CD338 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 35 | FCC4C7851B51BA41008CD338 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | FCC4C7871B51BA41008CD338 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | FCC4C78A1B51BA41008CD338 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 38 | FCC4C7901B51BA41008CD338 /* TwoDirectionalScrollerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TwoDirectionalScrollerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | FCC4C7951B51BA41008CD338 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | FCC4C7961B51BA41008CD338 /* TwoDirectionalScrollerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwoDirectionalScrollerTests.swift; sourceTree = ""; }; 41 | FCC4C7A01B51BAC4008CD338 /* CategoryRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CategoryRow.swift; sourceTree = ""; }; 42 | FCC4C7A21B51BBF0008CD338 /* VideoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoCell.swift; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | FCC4C7781B51BA41008CD338 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | FCC4C78D1B51BA41008CD338 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | FCC4C7721B51BA41008CD338 = { 64 | isa = PBXGroup; 65 | children = ( 66 | FCC4C77D1B51BA41008CD338 /* TwoDirectionalScroller */, 67 | FCC4C7931B51BA41008CD338 /* TwoDirectionalScrollerTests */, 68 | FCC4C77C1B51BA41008CD338 /* Products */, 69 | ); 70 | sourceTree = ""; 71 | }; 72 | FCC4C77C1B51BA41008CD338 /* Products */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | FCC4C77B1B51BA41008CD338 /* TwoDirectionalScroller.app */, 76 | FCC4C7901B51BA41008CD338 /* TwoDirectionalScrollerTests.xctest */, 77 | ); 78 | name = Products; 79 | sourceTree = ""; 80 | }; 81 | FCC4C77D1B51BA41008CD338 /* TwoDirectionalScroller */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | FCC4C7801B51BA41008CD338 /* AppDelegate.swift */, 85 | FCC4C7821B51BA41008CD338 /* ViewController.swift */, 86 | FCC4C7A01B51BAC4008CD338 /* CategoryRow.swift */, 87 | FCC4C7A21B51BBF0008CD338 /* VideoCell.swift */, 88 | FCC4C7841B51BA41008CD338 /* Main.storyboard */, 89 | FCC4C7871B51BA41008CD338 /* Images.xcassets */, 90 | FCC4C7891B51BA41008CD338 /* LaunchScreen.xib */, 91 | FCC4C77E1B51BA41008CD338 /* Supporting Files */, 92 | ); 93 | path = TwoDirectionalScroller; 94 | sourceTree = ""; 95 | }; 96 | FCC4C77E1B51BA41008CD338 /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | FCC4C77F1B51BA41008CD338 /* Info.plist */, 100 | ); 101 | name = "Supporting Files"; 102 | sourceTree = ""; 103 | }; 104 | FCC4C7931B51BA41008CD338 /* TwoDirectionalScrollerTests */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | FCC4C7961B51BA41008CD338 /* TwoDirectionalScrollerTests.swift */, 108 | FCC4C7941B51BA41008CD338 /* Supporting Files */, 109 | ); 110 | path = TwoDirectionalScrollerTests; 111 | sourceTree = ""; 112 | }; 113 | FCC4C7941B51BA41008CD338 /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | FCC4C7951B51BA41008CD338 /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | FCC4C77A1B51BA41008CD338 /* TwoDirectionalScroller */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = FCC4C79A1B51BA41008CD338 /* Build configuration list for PBXNativeTarget "TwoDirectionalScroller" */; 127 | buildPhases = ( 128 | FCC4C7771B51BA41008CD338 /* Sources */, 129 | FCC4C7781B51BA41008CD338 /* Frameworks */, 130 | FCC4C7791B51BA41008CD338 /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | ); 136 | name = TwoDirectionalScroller; 137 | productName = TwoDirectionalScroller; 138 | productReference = FCC4C77B1B51BA41008CD338 /* TwoDirectionalScroller.app */; 139 | productType = "com.apple.product-type.application"; 140 | }; 141 | FCC4C78F1B51BA41008CD338 /* TwoDirectionalScrollerTests */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = FCC4C79D1B51BA41008CD338 /* Build configuration list for PBXNativeTarget "TwoDirectionalScrollerTests" */; 144 | buildPhases = ( 145 | FCC4C78C1B51BA41008CD338 /* Sources */, 146 | FCC4C78D1B51BA41008CD338 /* Frameworks */, 147 | FCC4C78E1B51BA41008CD338 /* Resources */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | FCC4C7921B51BA41008CD338 /* PBXTargetDependency */, 153 | ); 154 | name = TwoDirectionalScrollerTests; 155 | productName = TwoDirectionalScrollerTests; 156 | productReference = FCC4C7901B51BA41008CD338 /* TwoDirectionalScrollerTests.xctest */; 157 | productType = "com.apple.product-type.bundle.unit-test"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | FCC4C7731B51BA41008CD338 /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastSwiftUpdateCheck = 0720; 166 | LastUpgradeCheck = 0640; 167 | ORGANIZATIONNAME = "Thorn Technologies"; 168 | TargetAttributes = { 169 | FCC4C77A1B51BA41008CD338 = { 170 | CreatedOnToolsVersion = 6.4; 171 | LastSwiftMigration = 0810; 172 | }; 173 | FCC4C78F1B51BA41008CD338 = { 174 | CreatedOnToolsVersion = 6.4; 175 | LastSwiftMigration = 0810; 176 | TestTargetID = FCC4C77A1B51BA41008CD338; 177 | }; 178 | }; 179 | }; 180 | buildConfigurationList = FCC4C7761B51BA41008CD338 /* Build configuration list for PBXProject "TwoDirectionalScroller" */; 181 | compatibilityVersion = "Xcode 3.2"; 182 | developmentRegion = English; 183 | hasScannedForEncodings = 0; 184 | knownRegions = ( 185 | en, 186 | Base, 187 | ); 188 | mainGroup = FCC4C7721B51BA41008CD338; 189 | productRefGroup = FCC4C77C1B51BA41008CD338 /* Products */; 190 | projectDirPath = ""; 191 | projectRoot = ""; 192 | targets = ( 193 | FCC4C77A1B51BA41008CD338 /* TwoDirectionalScroller */, 194 | FCC4C78F1B51BA41008CD338 /* TwoDirectionalScrollerTests */, 195 | ); 196 | }; 197 | /* End PBXProject section */ 198 | 199 | /* Begin PBXResourcesBuildPhase section */ 200 | FCC4C7791B51BA41008CD338 /* Resources */ = { 201 | isa = PBXResourcesBuildPhase; 202 | buildActionMask = 2147483647; 203 | files = ( 204 | FCC4C7861B51BA41008CD338 /* Main.storyboard in Resources */, 205 | FCC4C78B1B51BA41008CD338 /* LaunchScreen.xib in Resources */, 206 | FCC4C7881B51BA41008CD338 /* Images.xcassets in Resources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | FCC4C78E1B51BA41008CD338 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXSourcesBuildPhase section */ 220 | FCC4C7771B51BA41008CD338 /* Sources */ = { 221 | isa = PBXSourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | FCC4C7831B51BA41008CD338 /* ViewController.swift in Sources */, 225 | FCC4C7A31B51BBF0008CD338 /* VideoCell.swift in Sources */, 226 | FCC4C7A11B51BAC4008CD338 /* CategoryRow.swift in Sources */, 227 | FCC4C7811B51BA41008CD338 /* AppDelegate.swift in Sources */, 228 | ); 229 | runOnlyForDeploymentPostprocessing = 0; 230 | }; 231 | FCC4C78C1B51BA41008CD338 /* Sources */ = { 232 | isa = PBXSourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | FCC4C7971B51BA41008CD338 /* TwoDirectionalScrollerTests.swift in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | /* End PBXSourcesBuildPhase section */ 240 | 241 | /* Begin PBXTargetDependency section */ 242 | FCC4C7921B51BA41008CD338 /* PBXTargetDependency */ = { 243 | isa = PBXTargetDependency; 244 | target = FCC4C77A1B51BA41008CD338 /* TwoDirectionalScroller */; 245 | targetProxy = FCC4C7911B51BA41008CD338 /* PBXContainerItemProxy */; 246 | }; 247 | /* End PBXTargetDependency section */ 248 | 249 | /* Begin PBXVariantGroup section */ 250 | FCC4C7841B51BA41008CD338 /* Main.storyboard */ = { 251 | isa = PBXVariantGroup; 252 | children = ( 253 | FCC4C7851B51BA41008CD338 /* Base */, 254 | ); 255 | name = Main.storyboard; 256 | sourceTree = ""; 257 | }; 258 | FCC4C7891B51BA41008CD338 /* LaunchScreen.xib */ = { 259 | isa = PBXVariantGroup; 260 | children = ( 261 | FCC4C78A1B51BA41008CD338 /* Base */, 262 | ); 263 | name = LaunchScreen.xib; 264 | sourceTree = ""; 265 | }; 266 | /* End PBXVariantGroup section */ 267 | 268 | /* Begin XCBuildConfiguration section */ 269 | FCC4C7981B51BA41008CD338 /* Debug */ = { 270 | isa = XCBuildConfiguration; 271 | buildSettings = { 272 | ALWAYS_SEARCH_USER_PATHS = NO; 273 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 274 | CLANG_CXX_LIBRARY = "libc++"; 275 | CLANG_ENABLE_MODULES = YES; 276 | CLANG_ENABLE_OBJC_ARC = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_CONSTANT_CONVERSION = YES; 279 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 280 | CLANG_WARN_EMPTY_BODY = YES; 281 | CLANG_WARN_ENUM_CONVERSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 284 | CLANG_WARN_UNREACHABLE_CODE = YES; 285 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 286 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 287 | COPY_PHASE_STRIP = NO; 288 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_DYNAMIC_NO_PIC = NO; 292 | GCC_NO_COMMON_BLOCKS = YES; 293 | GCC_OPTIMIZATION_LEVEL = 0; 294 | GCC_PREPROCESSOR_DEFINITIONS = ( 295 | "DEBUG=1", 296 | "$(inherited)", 297 | ); 298 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 299 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 300 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 301 | GCC_WARN_UNDECLARED_SELECTOR = YES; 302 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 303 | GCC_WARN_UNUSED_FUNCTION = YES; 304 | GCC_WARN_UNUSED_VARIABLE = YES; 305 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 306 | MTL_ENABLE_DEBUG_INFO = YES; 307 | ONLY_ACTIVE_ARCH = YES; 308 | SDKROOT = iphoneos; 309 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 310 | TARGETED_DEVICE_FAMILY = "1,2"; 311 | }; 312 | name = Debug; 313 | }; 314 | FCC4C7991B51BA41008CD338 /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | buildSettings = { 317 | ALWAYS_SEARCH_USER_PATHS = NO; 318 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 319 | CLANG_CXX_LIBRARY = "libc++"; 320 | CLANG_ENABLE_MODULES = YES; 321 | CLANG_ENABLE_OBJC_ARC = YES; 322 | CLANG_WARN_BOOL_CONVERSION = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INT_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 334 | ENABLE_NS_ASSERTIONS = NO; 335 | ENABLE_STRICT_OBJC_MSGSEND = YES; 336 | GCC_C_LANGUAGE_STANDARD = gnu99; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 340 | GCC_WARN_UNDECLARED_SELECTOR = YES; 341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 342 | GCC_WARN_UNUSED_FUNCTION = YES; 343 | GCC_WARN_UNUSED_VARIABLE = YES; 344 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 345 | MTL_ENABLE_DEBUG_INFO = NO; 346 | SDKROOT = iphoneos; 347 | TARGETED_DEVICE_FAMILY = "1,2"; 348 | VALIDATE_PRODUCT = YES; 349 | }; 350 | name = Release; 351 | }; 352 | FCC4C79B1B51BA41008CD338 /* Debug */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | INFOPLIST_FILE = TwoDirectionalScroller/Info.plist; 357 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 358 | PRODUCT_NAME = "$(TARGET_NAME)"; 359 | SWIFT_VERSION = 3.0; 360 | }; 361 | name = Debug; 362 | }; 363 | FCC4C79C1B51BA41008CD338 /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 367 | INFOPLIST_FILE = TwoDirectionalScroller/Info.plist; 368 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 369 | PRODUCT_NAME = "$(TARGET_NAME)"; 370 | SWIFT_VERSION = 3.0; 371 | }; 372 | name = Release; 373 | }; 374 | FCC4C79E1B51BA41008CD338 /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | BUNDLE_LOADER = "$(TEST_HOST)"; 378 | FRAMEWORK_SEARCH_PATHS = ( 379 | "$(SDKROOT)/Developer/Library/Frameworks", 380 | "$(inherited)", 381 | ); 382 | GCC_PREPROCESSOR_DEFINITIONS = ( 383 | "DEBUG=1", 384 | "$(inherited)", 385 | ); 386 | INFOPLIST_FILE = TwoDirectionalScrollerTests/Info.plist; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | SWIFT_VERSION = 3.0; 390 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TwoDirectionalScroller.app/TwoDirectionalScroller"; 391 | }; 392 | name = Debug; 393 | }; 394 | FCC4C79F1B51BA41008CD338 /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | BUNDLE_LOADER = "$(TEST_HOST)"; 398 | FRAMEWORK_SEARCH_PATHS = ( 399 | "$(SDKROOT)/Developer/Library/Frameworks", 400 | "$(inherited)", 401 | ); 402 | INFOPLIST_FILE = TwoDirectionalScrollerTests/Info.plist; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 404 | PRODUCT_NAME = "$(TARGET_NAME)"; 405 | SWIFT_VERSION = 3.0; 406 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TwoDirectionalScroller.app/TwoDirectionalScroller"; 407 | }; 408 | name = Release; 409 | }; 410 | /* End XCBuildConfiguration section */ 411 | 412 | /* Begin XCConfigurationList section */ 413 | FCC4C7761B51BA41008CD338 /* Build configuration list for PBXProject "TwoDirectionalScroller" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | FCC4C7981B51BA41008CD338 /* Debug */, 417 | FCC4C7991B51BA41008CD338 /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | defaultConfigurationName = Release; 421 | }; 422 | FCC4C79A1B51BA41008CD338 /* Build configuration list for PBXNativeTarget "TwoDirectionalScroller" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | FCC4C79B1B51BA41008CD338 /* Debug */, 426 | FCC4C79C1B51BA41008CD338 /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | FCC4C79D1B51BA41008CD338 /* Build configuration list for PBXNativeTarget "TwoDirectionalScrollerTests" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | FCC4C79E1B51BA41008CD338 /* Debug */, 435 | FCC4C79F1B51BA41008CD338 /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | /* End XCConfigurationList section */ 441 | }; 442 | rootObject = FCC4C7731B51BA41008CD338 /* Project object */; 443 | } 444 | -------------------------------------------------------------------------------- /TwoDirectionalScroller.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TwoDirectionalScroller.xcodeproj/project.xcworkspace/xcshareddata/TwoDirectionalScroller.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | A3E990DB-2E84-478B-A506-0EA098810BB5 9 | IDESourceControlProjectName 10 | TwoDirectionalScroller 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 8FED66BEA4161E5D7095491D32A0A2B3A7550DB0 14 | https://github.com/ThornTechPublic/HorizontalScrollingCollectionView.git 15 | 16 | IDESourceControlProjectPath 17 | TwoDirectionalScroller.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 8FED66BEA4161E5D7095491D32A0A2B3A7550DB0 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/ThornTechPublic/HorizontalScrollingCollectionView.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 8FED66BEA4161E5D7095491D32A0A2B3A7550DB0 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 8FED66BEA4161E5D7095491D32A0A2B3A7550DB0 36 | IDESourceControlWCCName 37 | TwoDirectionalScroller 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TwoDirectionalScroller.xcodeproj/xcuserdata/robertchen.xcuserdatad/xcschemes/TwoDirectionalScroller.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /TwoDirectionalScroller.xcodeproj/xcuserdata/robertchen.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TwoDirectionalScroller.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | FCC4C77A1B51BA41008CD338 16 | 17 | primary 18 | 19 | 20 | FCC4C78F1B51BA41008CD338 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TwoDirectionalScroller 4 | // 5 | // Created by Robert Chen on 7/11/15. 6 | // Copyright (c) 2015 Thorn Technologies. 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 throttle down OpenGL ES frame rates. 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 inactive 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 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 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 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/CategoryRow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CategoryRow.swift 3 | // TwoDirectionalScroller 4 | // 5 | // Created by Robert Chen on 7/11/15. 6 | // Copyright (c) 2015 Thorn Technologies. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CategoryRow : UITableViewCell { 12 | @IBOutlet weak var collectionView: UICollectionView! 13 | } 14 | 15 | extension CategoryRow : UICollectionViewDataSource { 16 | 17 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 18 | return 12 19 | } 20 | 21 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 22 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "videoCell", for: indexPath) as! VideoCell 23 | return cell 24 | } 25 | 26 | } 27 | 28 | extension CategoryRow : UICollectionViewDelegateFlowLayout { 29 | 30 | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { 31 | let itemsPerRow:CGFloat = 4 32 | let hardCodedPadding:CGFloat = 5 33 | let itemWidth = (collectionView.bounds.width / itemsPerRow) - hardCodedPadding 34 | let itemHeight = collectionView.bounds.height - (2 * hardCodedPadding) 35 | return CGSize(width: itemWidth, height: itemHeight) 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TwoDirectionalScroller/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thorntech.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/VideoCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // VideoCell.swift 3 | // TwoDirectionalScroller 4 | // 5 | // Created by Robert Chen on 7/11/15. 6 | // Copyright (c) 2015 Thorn Technologies. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class VideoCell : UICollectionViewCell { 12 | 13 | @IBOutlet weak var imageView: UIImageView! 14 | } 15 | -------------------------------------------------------------------------------- /TwoDirectionalScroller/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | class ViewController: UIViewController { 4 | var categories = ["Action", "Drama", "Science Fiction", "Kids", "Horror"] 5 | } 6 | 7 | extension ViewController : UITableViewDelegate { } 8 | 9 | extension ViewController : UITableViewDataSource { 10 | 11 | func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { 12 | return categories[section] 13 | } 14 | 15 | func numberOfSections(in tableView: UITableView) -> Int { 16 | return categories.count 17 | } 18 | 19 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 20 | return 1 21 | } 22 | 23 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 24 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell") as! CategoryRow 25 | return cell 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /TwoDirectionalScrollerTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.thorntech.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TwoDirectionalScrollerTests/TwoDirectionalScrollerTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TwoDirectionalScrollerTests.swift 3 | // TwoDirectionalScrollerTests 4 | // 5 | // Created by Robert Chen on 7/11/15. 6 | // Copyright (c) 2015 Thorn Technologies. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class TwoDirectionalScrollerTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------