├── HBHorizontalTableView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── HBHorizontalTableView.xccheckout │ └── xcuserdata │ │ └── ASH.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── ASH.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── HBHorizontalTableView.xcscheme │ └── xcschememanagement.plist ├── HBHorizontalTableView ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── HBGroupCell.swift ├── HBGroupCell.xib ├── HBTableViewController.swift ├── HorizontalTableView │ ├── HBAppCell.swift │ ├── HBAppCell.xib │ └── HBHorizontalTableView.swift ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── grop0 │ │ ├── calendar.imageset │ │ │ ├── Contents.json │ │ │ └── calendar.png │ │ ├── contacts.imageset │ │ │ ├── Contents.json │ │ │ └── contacts.png │ │ ├── finder.imageset │ │ │ ├── Contents.json │ │ │ └── finder.png │ │ ├── game-center.imageset │ │ │ ├── Contents.json │ │ │ └── game-center.png │ │ ├── health.imageset │ │ │ ├── Contents.json │ │ │ └── health.png │ │ ├── healthbook.imageset │ │ │ ├── Contents.json │ │ │ └── healthbook.png │ │ ├── ibook.imageset │ │ │ ├── Contents.json │ │ │ └── ibook.png │ │ ├── icloud-drive.imageset │ │ │ ├── Contents.json │ │ │ └── icloud-drive.png │ │ ├── passbook.imageset │ │ │ ├── Contents.json │ │ │ └── passbook.png │ │ ├── preview.imageset │ │ │ ├── Contents.json │ │ │ └── preview.png │ │ ├── reminders.imageset │ │ │ ├── Contents.json │ │ │ └── reminders.png │ │ ├── spotlight.imageset │ │ │ ├── Contents.json │ │ │ └── spotlight.png │ │ ├── textedit.imageset │ │ │ ├── Contents.json │ │ │ └── textedit.png │ │ └── tips.imageset │ │ │ ├── Contents.json │ │ │ └── tips.png │ └── group1 │ │ ├── angry-birds.imageset │ │ ├── Contents.json │ │ └── angry-birds.png │ │ ├── cut-the-rope.imageset │ │ ├── Contents.json │ │ └── cut-the-rope.png │ │ ├── early-bird.imageset │ │ ├── Contents.json │ │ └── early-bird.png │ │ ├── fruit-ninja.imageset │ │ ├── Contents.json │ │ └── fruit-ninja.png │ │ └── plants-vs-zombies.imageset │ │ ├── Contents.json │ │ └── plants-vs-zombies.png └── Info.plist ├── HBHorizontalTableViewTests ├── HBHorizontalTableViewTests.swift └── Info.plist └── README.md /HBHorizontalTableView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5E683DF81AC502F6002E226E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683DF71AC502F6002E226E /* AppDelegate.swift */; }; 11 | 5E683DFD1AC502F6002E226E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E683DFB1AC502F6002E226E /* Main.storyboard */; }; 12 | 5E683DFF1AC502F6002E226E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E683DFE1AC502F6002E226E /* Images.xcassets */; }; 13 | 5E683E021AC502F6002E226E /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E683E001AC502F6002E226E /* LaunchScreen.xib */; }; 14 | 5E683E0E1AC502F6002E226E /* HBHorizontalTableViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683E0D1AC502F6002E226E /* HBHorizontalTableViewTests.swift */; }; 15 | 5E683E191AC503D7002E226E /* HBHorizontalTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683E181AC503D7002E226E /* HBHorizontalTableView.swift */; }; 16 | 5E683E1C1AC70061002E226E /* HBAppCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683E1A1AC70061002E226E /* HBAppCell.swift */; }; 17 | 5E683E1D1AC70061002E226E /* HBAppCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E683E1B1AC70061002E226E /* HBAppCell.xib */; }; 18 | 5E683E1F1AC7AD0F002E226E /* HBTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683E1E1AC7AD0F002E226E /* HBTableViewController.swift */; }; 19 | 5E683E221AC7AD4E002E226E /* HBGroupCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E683E201AC7AD4E002E226E /* HBGroupCell.swift */; }; 20 | 5E683E231AC7AD4E002E226E /* HBGroupCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E683E211AC7AD4E002E226E /* HBGroupCell.xib */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 5E683E081AC502F6002E226E /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 5E683DEA1AC502F6002E226E /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 5E683DF11AC502F6002E226E; 29 | remoteInfo = HBHorizontalTableView; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 5E683DF21AC502F6002E226E /* HBHorizontalTableView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HBHorizontalTableView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 5E683DF61AC502F6002E226E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 5E683DF71AC502F6002E226E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 5E683DFC1AC502F6002E226E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 5E683DFE1AC502F6002E226E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 5E683E011AC502F6002E226E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 40 | 5E683E071AC502F6002E226E /* HBHorizontalTableViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HBHorizontalTableViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 5E683E0C1AC502F6002E226E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 42 | 5E683E0D1AC502F6002E226E /* HBHorizontalTableViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HBHorizontalTableViewTests.swift; sourceTree = ""; }; 43 | 5E683E181AC503D7002E226E /* HBHorizontalTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HBHorizontalTableView.swift; sourceTree = ""; }; 44 | 5E683E1A1AC70061002E226E /* HBAppCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = HBAppCell.swift; path = HorizontalTableView/HBAppCell.swift; sourceTree = ""; }; 45 | 5E683E1B1AC70061002E226E /* HBAppCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = HBAppCell.xib; path = HorizontalTableView/HBAppCell.xib; sourceTree = ""; }; 46 | 5E683E1E1AC7AD0F002E226E /* HBTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HBTableViewController.swift; sourceTree = ""; }; 47 | 5E683E201AC7AD4E002E226E /* HBGroupCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HBGroupCell.swift; sourceTree = ""; }; 48 | 5E683E211AC7AD4E002E226E /* HBGroupCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HBGroupCell.xib; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 5E683DEF1AC502F6002E226E /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | 5E683E041AC502F6002E226E /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 5E683DE91AC502F6002E226E = { 70 | isa = PBXGroup; 71 | children = ( 72 | 5E683DF41AC502F6002E226E /* HBHorizontalTableView */, 73 | 5E683E0A1AC502F6002E226E /* HBHorizontalTableViewTests */, 74 | 5E683DF31AC502F6002E226E /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 5E683DF31AC502F6002E226E /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 5E683DF21AC502F6002E226E /* HBHorizontalTableView.app */, 82 | 5E683E071AC502F6002E226E /* HBHorizontalTableViewTests.xctest */, 83 | ); 84 | name = Products; 85 | sourceTree = ""; 86 | }; 87 | 5E683DF41AC502F6002E226E /* HBHorizontalTableView */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 5E683E1E1AC7AD0F002E226E /* HBTableViewController.swift */, 91 | 5E683E201AC7AD4E002E226E /* HBGroupCell.swift */, 92 | 5E683E211AC7AD4E002E226E /* HBGroupCell.xib */, 93 | 5E683E1A1AC70061002E226E /* HBAppCell.swift */, 94 | 5E683E1B1AC70061002E226E /* HBAppCell.xib */, 95 | 5E683E171AC50366002E226E /* HorizontalTableView */, 96 | 5E683DF51AC502F6002E226E /* Supporting Files */, 97 | ); 98 | path = HBHorizontalTableView; 99 | sourceTree = ""; 100 | }; 101 | 5E683DF51AC502F6002E226E /* Supporting Files */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 5E683DFB1AC502F6002E226E /* Main.storyboard */, 105 | 5E683DF71AC502F6002E226E /* AppDelegate.swift */, 106 | 5E683DFE1AC502F6002E226E /* Images.xcassets */, 107 | 5E683E001AC502F6002E226E /* LaunchScreen.xib */, 108 | 5E683DF61AC502F6002E226E /* Info.plist */, 109 | ); 110 | name = "Supporting Files"; 111 | sourceTree = ""; 112 | }; 113 | 5E683E0A1AC502F6002E226E /* HBHorizontalTableViewTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 5E683E0D1AC502F6002E226E /* HBHorizontalTableViewTests.swift */, 117 | 5E683E0B1AC502F6002E226E /* Supporting Files */, 118 | ); 119 | path = HBHorizontalTableViewTests; 120 | sourceTree = ""; 121 | }; 122 | 5E683E0B1AC502F6002E226E /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 5E683E0C1AC502F6002E226E /* Info.plist */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | 5E683E171AC50366002E226E /* HorizontalTableView */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 5E683E181AC503D7002E226E /* HBHorizontalTableView.swift */, 134 | ); 135 | path = HorizontalTableView; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXNativeTarget section */ 141 | 5E683DF11AC502F6002E226E /* HBHorizontalTableView */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 5E683E111AC502F6002E226E /* Build configuration list for PBXNativeTarget "HBHorizontalTableView" */; 144 | buildPhases = ( 145 | 5E683DEE1AC502F6002E226E /* Sources */, 146 | 5E683DEF1AC502F6002E226E /* Frameworks */, 147 | 5E683DF01AC502F6002E226E /* Resources */, 148 | ); 149 | buildRules = ( 150 | ); 151 | dependencies = ( 152 | ); 153 | name = HBHorizontalTableView; 154 | productName = HBHorizontalTableView; 155 | productReference = 5E683DF21AC502F6002E226E /* HBHorizontalTableView.app */; 156 | productType = "com.apple.product-type.application"; 157 | }; 158 | 5E683E061AC502F6002E226E /* HBHorizontalTableViewTests */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 5E683E141AC502F6002E226E /* Build configuration list for PBXNativeTarget "HBHorizontalTableViewTests" */; 161 | buildPhases = ( 162 | 5E683E031AC502F6002E226E /* Sources */, 163 | 5E683E041AC502F6002E226E /* Frameworks */, 164 | 5E683E051AC502F6002E226E /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | 5E683E091AC502F6002E226E /* PBXTargetDependency */, 170 | ); 171 | name = HBHorizontalTableViewTests; 172 | productName = HBHorizontalTableViewTests; 173 | productReference = 5E683E071AC502F6002E226E /* HBHorizontalTableViewTests.xctest */; 174 | productType = "com.apple.product-type.bundle.unit-test"; 175 | }; 176 | /* End PBXNativeTarget section */ 177 | 178 | /* Begin PBXProject section */ 179 | 5E683DEA1AC502F6002E226E /* Project object */ = { 180 | isa = PBXProject; 181 | attributes = { 182 | LastUpgradeCheck = 0620; 183 | ORGANIZATIONNAME = "Huang Zhaoyu"; 184 | TargetAttributes = { 185 | 5E683DF11AC502F6002E226E = { 186 | CreatedOnToolsVersion = 6.2; 187 | }; 188 | 5E683E061AC502F6002E226E = { 189 | CreatedOnToolsVersion = 6.2; 190 | TestTargetID = 5E683DF11AC502F6002E226E; 191 | }; 192 | }; 193 | }; 194 | buildConfigurationList = 5E683DED1AC502F6002E226E /* Build configuration list for PBXProject "HBHorizontalTableView" */; 195 | compatibilityVersion = "Xcode 3.2"; 196 | developmentRegion = English; 197 | hasScannedForEncodings = 0; 198 | knownRegions = ( 199 | en, 200 | Base, 201 | ); 202 | mainGroup = 5E683DE91AC502F6002E226E; 203 | productRefGroup = 5E683DF31AC502F6002E226E /* Products */; 204 | projectDirPath = ""; 205 | projectRoot = ""; 206 | targets = ( 207 | 5E683DF11AC502F6002E226E /* HBHorizontalTableView */, 208 | 5E683E061AC502F6002E226E /* HBHorizontalTableViewTests */, 209 | ); 210 | }; 211 | /* End PBXProject section */ 212 | 213 | /* Begin PBXResourcesBuildPhase section */ 214 | 5E683DF01AC502F6002E226E /* Resources */ = { 215 | isa = PBXResourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | 5E683DFD1AC502F6002E226E /* Main.storyboard in Resources */, 219 | 5E683E1D1AC70061002E226E /* HBAppCell.xib in Resources */, 220 | 5E683E021AC502F6002E226E /* LaunchScreen.xib in Resources */, 221 | 5E683DFF1AC502F6002E226E /* Images.xcassets in Resources */, 222 | 5E683E231AC7AD4E002E226E /* HBGroupCell.xib in Resources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | 5E683E051AC502F6002E226E /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | /* End PBXResourcesBuildPhase section */ 234 | 235 | /* Begin PBXSourcesBuildPhase section */ 236 | 5E683DEE1AC502F6002E226E /* Sources */ = { 237 | isa = PBXSourcesBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | 5E683E1C1AC70061002E226E /* HBAppCell.swift in Sources */, 241 | 5E683DF81AC502F6002E226E /* AppDelegate.swift in Sources */, 242 | 5E683E221AC7AD4E002E226E /* HBGroupCell.swift in Sources */, 243 | 5E683E191AC503D7002E226E /* HBHorizontalTableView.swift in Sources */, 244 | 5E683E1F1AC7AD0F002E226E /* HBTableViewController.swift in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 5E683E031AC502F6002E226E /* Sources */ = { 249 | isa = PBXSourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 5E683E0E1AC502F6002E226E /* HBHorizontalTableViewTests.swift in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXTargetDependency section */ 259 | 5E683E091AC502F6002E226E /* PBXTargetDependency */ = { 260 | isa = PBXTargetDependency; 261 | target = 5E683DF11AC502F6002E226E /* HBHorizontalTableView */; 262 | targetProxy = 5E683E081AC502F6002E226E /* PBXContainerItemProxy */; 263 | }; 264 | /* End PBXTargetDependency section */ 265 | 266 | /* Begin PBXVariantGroup section */ 267 | 5E683DFB1AC502F6002E226E /* Main.storyboard */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | 5E683DFC1AC502F6002E226E /* Base */, 271 | ); 272 | name = Main.storyboard; 273 | sourceTree = ""; 274 | }; 275 | 5E683E001AC502F6002E226E /* LaunchScreen.xib */ = { 276 | isa = PBXVariantGroup; 277 | children = ( 278 | 5E683E011AC502F6002E226E /* Base */, 279 | ); 280 | name = LaunchScreen.xib; 281 | sourceTree = ""; 282 | }; 283 | /* End PBXVariantGroup section */ 284 | 285 | /* Begin XCBuildConfiguration section */ 286 | 5E683E0F1AC502F6002E226E /* Debug */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 291 | CLANG_CXX_LIBRARY = "libc++"; 292 | CLANG_ENABLE_MODULES = YES; 293 | CLANG_ENABLE_OBJC_ARC = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_OPTIMIZATION_LEVEL = 0; 309 | GCC_PREPROCESSOR_DEFINITIONS = ( 310 | "DEBUG=1", 311 | "$(inherited)", 312 | ); 313 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 321 | MTL_ENABLE_DEBUG_INFO = YES; 322 | ONLY_ACTIVE_ARCH = YES; 323 | SDKROOT = iphoneos; 324 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 325 | TARGETED_DEVICE_FAMILY = "1,2"; 326 | }; 327 | name = Debug; 328 | }; 329 | 5E683E101AC502F6002E226E /* Release */ = { 330 | isa = XCBuildConfiguration; 331 | buildSettings = { 332 | ALWAYS_SEARCH_USER_PATHS = NO; 333 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 334 | CLANG_CXX_LIBRARY = "libc++"; 335 | CLANG_ENABLE_MODULES = YES; 336 | CLANG_ENABLE_OBJC_ARC = YES; 337 | CLANG_WARN_BOOL_CONVERSION = YES; 338 | CLANG_WARN_CONSTANT_CONVERSION = YES; 339 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 340 | CLANG_WARN_EMPTY_BODY = YES; 341 | CLANG_WARN_ENUM_CONVERSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | ENABLE_NS_ASSERTIONS = NO; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 358 | MTL_ENABLE_DEBUG_INFO = NO; 359 | SDKROOT = iphoneos; 360 | TARGETED_DEVICE_FAMILY = "1,2"; 361 | VALIDATE_PRODUCT = YES; 362 | }; 363 | name = Release; 364 | }; 365 | 5E683E121AC502F6002E226E /* Debug */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 369 | INFOPLIST_FILE = HBHorizontalTableView/Info.plist; 370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | }; 373 | name = Debug; 374 | }; 375 | 5E683E131AC502F6002E226E /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | buildSettings = { 378 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 379 | INFOPLIST_FILE = HBHorizontalTableView/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 381 | PRODUCT_NAME = "$(TARGET_NAME)"; 382 | }; 383 | name = Release; 384 | }; 385 | 5E683E151AC502F6002E226E /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | BUNDLE_LOADER = "$(TEST_HOST)"; 389 | FRAMEWORK_SEARCH_PATHS = ( 390 | "$(SDKROOT)/Developer/Library/Frameworks", 391 | "$(inherited)", 392 | ); 393 | GCC_PREPROCESSOR_DEFINITIONS = ( 394 | "DEBUG=1", 395 | "$(inherited)", 396 | ); 397 | INFOPLIST_FILE = HBHorizontalTableViewTests/Info.plist; 398 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 399 | PRODUCT_NAME = "$(TARGET_NAME)"; 400 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HBHorizontalTableView.app/HBHorizontalTableView"; 401 | }; 402 | name = Debug; 403 | }; 404 | 5E683E161AC502F6002E226E /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | BUNDLE_LOADER = "$(TEST_HOST)"; 408 | FRAMEWORK_SEARCH_PATHS = ( 409 | "$(SDKROOT)/Developer/Library/Frameworks", 410 | "$(inherited)", 411 | ); 412 | INFOPLIST_FILE = HBHorizontalTableViewTests/Info.plist; 413 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 414 | PRODUCT_NAME = "$(TARGET_NAME)"; 415 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HBHorizontalTableView.app/HBHorizontalTableView"; 416 | }; 417 | name = Release; 418 | }; 419 | /* End XCBuildConfiguration section */ 420 | 421 | /* Begin XCConfigurationList section */ 422 | 5E683DED1AC502F6002E226E /* Build configuration list for PBXProject "HBHorizontalTableView" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | 5E683E0F1AC502F6002E226E /* Debug */, 426 | 5E683E101AC502F6002E226E /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | 5E683E111AC502F6002E226E /* Build configuration list for PBXNativeTarget "HBHorizontalTableView" */ = { 432 | isa = XCConfigurationList; 433 | buildConfigurations = ( 434 | 5E683E121AC502F6002E226E /* Debug */, 435 | 5E683E131AC502F6002E226E /* Release */, 436 | ); 437 | defaultConfigurationIsVisible = 0; 438 | defaultConfigurationName = Release; 439 | }; 440 | 5E683E141AC502F6002E226E /* Build configuration list for PBXNativeTarget "HBHorizontalTableViewTests" */ = { 441 | isa = XCConfigurationList; 442 | buildConfigurations = ( 443 | 5E683E151AC502F6002E226E /* Debug */, 444 | 5E683E161AC502F6002E226E /* Release */, 445 | ); 446 | defaultConfigurationIsVisible = 0; 447 | defaultConfigurationName = Release; 448 | }; 449 | /* End XCConfigurationList section */ 450 | }; 451 | rootObject = 5E683DEA1AC502F6002E226E /* Project object */; 452 | } 453 | -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/project.xcworkspace/xcshareddata/HBHorizontalTableView.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 0F85AF83-64CE-4002-A954-579267669EFE 9 | IDESourceControlProjectName 10 | HBHorizontalTableView 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 3EDAFABAAD727806A8BDB197A5612740A852EE3F 14 | https://github.com/izyhuang/HBHorizontalTableView.git 15 | 16 | IDESourceControlProjectPath 17 | HBHorizontalTableView.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 3EDAFABAAD727806A8BDB197A5612740A852EE3F 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/izyhuang/HBHorizontalTableView.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 3EDAFABAAD727806A8BDB197A5612740A852EE3F 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 3EDAFABAAD727806A8BDB197A5612740A852EE3F 36 | IDESourceControlWCCName 37 | HBHorizontalTableView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/project.xcworkspace/xcuserdata/ASH.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView.xcodeproj/project.xcworkspace/xcuserdata/ASH.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/xcuserdata/ASH.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/xcuserdata/ASH.xcuserdatad/xcschemes/HBHorizontalTableView.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 | -------------------------------------------------------------------------------- /HBHorizontalTableView.xcodeproj/xcuserdata/ASH.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HBHorizontalTableView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5E683DF11AC502F6002E226E 16 | 17 | primary 18 | 19 | 20 | 5E683E061AC502F6002E226E 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HBHorizontalTableView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // HBHorizontalTableView 4 | // 5 | // Created by 黄招宇 on 15/3/27. 6 | // Copyright (c) 2015年 Huang Zhaoyu. 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: [NSObject: AnyObject]?) -> 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 | -------------------------------------------------------------------------------- /HBHorizontalTableView/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 | -------------------------------------------------------------------------------- /HBHorizontalTableView/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 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HBGroupCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HBGroupCell.swift 3 | // HBHorizontalTableView 4 | // 5 | // Created by 黄招宇 on 15/3/29. 6 | // Copyright (c) 2015年 Huang Zhaoyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class HBGroupCell: UITableViewCell, HBTableViewDelegate { 12 | 13 | var apps = Array>() 14 | 15 | @IBOutlet weak var groupNameLabel: UILabel! 16 | var horizontalTableView: HBHorizontalTableView! 17 | 18 | @IBAction func showAllButton(sender: UIButton) { 19 | UIAlertView(title: "Show All", message: "created by 黄招宇", delegate: nil, cancelButtonTitle: "OK").show() 20 | } 21 | 22 | func configureCell(group: Dictionary>>) { 23 | let htv = HBHorizontalTableView(frame: CGRectMake(0, 44, self.contentView.bounds.width, 178)) 24 | htv.delegate = self 25 | contentView.addSubview(htv) 26 | horizontalTableView = htv 27 | 28 | groupNameLabel.text = group["about"]![0]["name"] 29 | apps = group["apps"]! 30 | } 31 | 32 | override func awakeFromNib() { 33 | super.awakeFromNib() 34 | println("group_cell -> awakeFromNib") 35 | } 36 | 37 | 38 | // MARK: Horizontal TableView Delegate 39 | 40 | func numberOfSectionsInTableView(horizontalTableView: HBHorizontalTableView) -> Int { 41 | return 1 42 | } 43 | 44 | func tableView(horizontalTableView: HBHorizontalTableView, numberOfRowsInSection section: Int) -> Int { 45 | return apps.count 46 | } 47 | 48 | func tableView(horizontalTableView: HBHorizontalTableView, widthForCellAtIndexPath: NSIndexPath) -> CGFloat { 49 | return 100 50 | } 51 | 52 | func tableView(horizontalTableView: HBHorizontalTableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 53 | let cell: HBAppCell = horizontalTableView.tableView!.dequeueReusableCellWithIdentifier("app_cell", forIndexPath: indexPath) as! HBAppCell 54 | cell.configureCell(apps[indexPath.row]) 55 | return cell 56 | } 57 | 58 | func tableView(horizontalTableView: HBHorizontalTableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 59 | println("selected row -> \(indexPath.row)") 60 | horizontalTableView.tableView!.deselectRowAtIndexPath(indexPath, animated: true) 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HBGroupCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HBTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HBTableViewController.swift 3 | // HBHorizontalTableView 4 | // 5 | // Created by 黄招宇 on 15/3/29. 6 | // Copyright (c) 2015年 Huang Zhaoyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class HBTableViewController: UITableViewController { 12 | 13 | var groups = Array>>>() 14 | var apps = Array>() 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | register() 19 | loadData() 20 | } 21 | 22 | func loadData() { 23 | let dict0 = ["image":"calendar", "name":"calendar", "type":"儿童", "price":"0.00"] 24 | apps.append(dict0) 25 | 26 | let dict1 = ["image":"contacts", "name":"contacts", "type":"工具", "price":"1.00"] 27 | apps.append(dict1) 28 | 29 | let dict2 = ["image":"finder", "name":"finder", "type":"效率", "price":"2.00"] 30 | apps.append(dict2) 31 | 32 | let dict3 = ["image":"game-center", "name":"game-center", "type":"游戏", "price":"3.00"] 33 | apps.append(dict3) 34 | 35 | let dict4 = ["image":"health", "name":"health", "type":"健康", "price":"4.00"] 36 | apps.append(dict4) 37 | 38 | let dict5 = ["image":"healthbook", "name":"healthbook", "type":"健康", "price":"5.00"] 39 | apps.append(dict5) 40 | 41 | let dict6 = ["image":"ibook", "name":"ibook", "type":"图书", "price":"6.00"] 42 | apps.append(dict6) 43 | 44 | let dict7 = ["image":"icloud-drive", "name":"icloud-drive", "type":"效率", "price":"7.00"] 45 | apps.append(dict7) 46 | 47 | let dict8 = ["image":"passbook", "name":"passbook", "type":"生活", "price":"8.00"] 48 | apps.append(dict8) 49 | 50 | let dict9 = ["image":"preview", "name":"preview", "type":"效率", "price":"9.00"] 51 | apps.append(dict9) 52 | 53 | let dict10 = ["image":"reminders", "name":"reminders", "type":"效率", "price":"10.00"] 54 | apps.append(dict10) 55 | 56 | let dict11 = ["image":"spotlight", "name":"spotlight", "type":"工具", "price":"11.00"] 57 | apps.append(dict11) 58 | 59 | let dict12 = ["image":"textedit", "name":"textedit", "type":"效率", "price":"12.00"] 60 | apps.append(dict12) 61 | 62 | let dict13 = ["image":"tips", "name":"tips", "type":"参考", "price":"13.00"] 63 | apps.append(dict13) 64 | 65 | let group0 = ["about":[["name":"优秀新 App"]], "apps": apps] 66 | groups.append(group0) 67 | 68 | // 清空 69 | apps = [] 70 | 71 | let dict14 = ["image":"angry-birds", "name":"angry-birds", "type":"游戏", "price":"25.00"] 72 | apps.append(dict14) 73 | 74 | let dict15 = ["image":"cut-the-rope", "name":"cut-the-rope", "type":"游戏", "price":"6.00"] 75 | apps.append(dict15) 76 | 77 | let dict16 = ["image":"early-bird", "name":"early-bird", "type":"游戏", "price":"16.00"] 78 | apps.append(dict16) 79 | 80 | let dict17 = ["image":"fruit-ninja", "name":"fruit-ninja", "type":"游戏", "price":"22.00"] 81 | apps.append(dict17) 82 | 83 | let dict18 = ["image":"plants-vs-zombies", "name":"plants-vs-zombies", "type":"游戏", "price":"30.00"] 84 | apps.append(dict18) 85 | 86 | let group1 = ["about":[["name":"优秀新游戏"]], "apps": apps] 87 | groups.append(group1) 88 | } 89 | 90 | func register() { 91 | tableView.registerClass(HBGroupCell.self, forCellReuseIdentifier: "group_cell") 92 | var cellNib: UINib = UINib(nibName: "HBGroupCell", bundle: nil) 93 | tableView.registerNib(cellNib, forCellReuseIdentifier: "group_cell") 94 | } 95 | 96 | 97 | // MARK: TableViewDelegate 98 | 99 | override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 100 | return 240 101 | } 102 | 103 | // MARK: TableViewDataSource 104 | 105 | override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 106 | return groups.count 107 | } 108 | 109 | override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 110 | let cell: HBGroupCell = tableView.dequeueReusableCellWithIdentifier("group_cell", forIndexPath: indexPath) as! HBGroupCell 111 | cell.configureCell(groups[indexPath.row]) 112 | return cell 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HorizontalTableView/HBAppCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HBAppCell.swift 3 | // HBHorizontalTableView 4 | // 5 | // Created by 黄招宇 on 15/3/28. 6 | // Copyright (c) 2015年 Huang Zhaoyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class HBAppCell: UITableViewCell { 12 | 13 | @IBOutlet weak var iconButton: UIButton! 14 | @IBOutlet weak var nameLabel: UILabel! 15 | @IBOutlet weak var typeLabel: UILabel! 16 | @IBOutlet weak var priceLabel: UILabel! 17 | 18 | var app = Dictionary() 19 | 20 | @IBAction func iconButtonDidClicked(sender: UIButton) { 21 | UIAlertView(title: app["name"], message: "created by 黄招宇", delegate: nil, cancelButtonTitle: "OK").show() 22 | } 23 | 24 | func configureCell(app: Dictionary) { 25 | self.app = app 26 | iconButton.setBackgroundImage(UIImage(named: app["name"]!), forState: UIControlState.Normal) 27 | nameLabel.text = app["name"] 28 | typeLabel.text = app["type"] 29 | priceLabel.text = app["price"] == "0.00" ? "Free" : "¥"+app["price"]! 30 | } 31 | 32 | override func awakeFromNib() { 33 | super.awakeFromNib() 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HorizontalTableView/HBAppCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 22 | 28 | 34 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /HBHorizontalTableView/HorizontalTableView/HBHorizontalTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HBHorizontalTableView.swift 3 | // HBHorizontalTableView 4 | // 5 | // Created by 黄招宇 on 15/3/27. 6 | // Copyright (c) 2015年 Huang Zhaoyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | import QuartzCore 12 | 13 | @objc protocol HBTableViewDelegate: NSObjectProtocol { 14 | func tableView(horizontalTableView: HBHorizontalTableView, numberOfRowsInSection section: Int) -> Int 15 | func tableView(horizontalTableView: HBHorizontalTableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell 16 | 17 | optional func numberOfSectionsInTableView(horizontalTableView: HBHorizontalTableView) -> Int 18 | optional func tableView(horizontalTableView: HBHorizontalTableView, didSelectRowAtIndexPath indexPath: NSIndexPath) 19 | optional func tableView(horizontalTableView: HBHorizontalTableView, viewForHeaderInSection section: Int) -> UIView? 20 | optional func tableView(horizontalTableView: HBHorizontalTableView, viewForFooterInSection section: Int) -> UIView? 21 | optional func tableView(horizontalTableView: HBHorizontalTableView, widthForCellAtIndexPath: NSIndexPath) -> CGFloat 22 | } 23 | 24 | class HBHorizontalTableView: UIView, UITableViewDataSource, UITableViewDelegate { 25 | var delegate: HBTableViewDelegate? 26 | var tableView: UITableView? 27 | 28 | var rowWidth: CGFloat { 29 | get { 30 | return tableView!.rowHeight 31 | } 32 | } 33 | 34 | var contentSize: CGSize { 35 | get { 36 | let size: CGSize = tableView!.contentSize 37 | return CGSizeMake(size.height, size.width) 38 | } 39 | } 40 | 41 | var contentOffset: CGPoint { 42 | get { 43 | let offset: CGPoint = tableView!.contentOffset 44 | return CGPointMake(offset.y, offset.x) 45 | } 46 | } 47 | 48 | var animated: Bool? 49 | 50 | override init(frame: CGRect) { 51 | super.init(frame: frame) 52 | println("horizontal TableView -> initWithFrame") 53 | setTableView() 54 | set_Frame(self.frame) 55 | setContentOffset(self.contentOffset) 56 | setRowWidth(self.rowWidth) 57 | } 58 | 59 | override func awakeFromNib() { 60 | super.awakeFromNib() 61 | println("horizontal TableView -> awakeFromNib") 62 | setTableView() 63 | set_Frame(self.frame) 64 | setContentOffset(self.contentOffset) 65 | setRowWidth(self.rowWidth) 66 | } 67 | 68 | required init(coder aDecoder: NSCoder) { 69 | super.init(coder: aDecoder) 70 | } 71 | 72 | func setTableView() { 73 | refreshOrientation() 74 | 75 | let tableView = UITableView(frame: self.frame) 76 | tableView.delegate = self 77 | tableView.dataSource = self 78 | tableView.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight 79 | tableView.separatorStyle = UITableViewCellSeparatorStyle.None 80 | tableView.showsVerticalScrollIndicator = false 81 | self.addSubview(tableView) 82 | self.tableView = tableView 83 | 84 | tableView.registerClass(HBAppCell.self, forCellReuseIdentifier: "app_cell") 85 | var cellNib: UINib = UINib(nibName: "HBAppCell", bundle: nil) 86 | tableView.registerNib(cellNib, forCellReuseIdentifier: "app_cell") 87 | } 88 | 89 | func set_Frame(frame: CGRect) { 90 | super.frame = frame 91 | refreshOrientation() 92 | } 93 | 94 | func setContentOffset(offset: CGPoint) { 95 | setContentOffset(offset, animated: false) 96 | } 97 | 98 | func setContentOffset(offset: CGPoint, animated: Bool) { 99 | tableView!.setContentOffset(CGPointMake(offset.x, offset.y), animated: animated) 100 | } 101 | 102 | func setRowWidth(rowWidth: CGFloat) { 103 | tableView!.rowHeight = rowWidth 104 | } 105 | 106 | func refreshOrientation() { 107 | if tableView == nil { return } 108 | 109 | // First reset rotation 110 | tableView!.transform = CGAffineTransformIdentity 111 | tableView!.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height) 112 | 113 | // Adjust frame 114 | let xOrigin = (self.bounds.size.width - self.bounds.size.height) / 2.0 115 | let yOrigin = (self.bounds.size.height - self.bounds.size.width) / 2.0 116 | tableView!.frame = CGRectMake(xOrigin, yOrigin, self.bounds.size.height, self.bounds.size.width) 117 | 118 | // Apply rotation again 119 | tableView!.transform = CGAffineTransformMakeRotation(CGFloat(-M_PI)/2) 120 | tableView!.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, self.bounds.size.height - 7.0) 121 | } 122 | 123 | 124 | // MARK: TableView Delegate 125 | 126 | func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { 127 | if delegate!.respondsToSelector("tableView:viewForHeaderInSection:") { 128 | let headerView: UIView = delegate!.tableView!(self, viewForHeaderInSection: section)! 129 | return headerView.frame.size.width 130 | } 131 | return 0 132 | } 133 | 134 | func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { 135 | if delegate!.respondsToSelector("tableView:viewForFooterInSection:") { 136 | let footerView: UIView = delegate!.tableView!(self, viewForFooterInSection: section)! 137 | return footerView.frame.size.width 138 | } 139 | return 0 140 | } 141 | 142 | func viewToHoldSectionView(sectionView: UIView) -> UIView { 143 | sectionView.frame = CGRectMake(0, 0, sectionView.frame.size.width, self.frame.size.height) 144 | let rotatedView = UIView(frame: sectionView.frame) 145 | rotatedView.transform = CGAffineTransformMakeRotation(CGFloat(M_PI/2)) 146 | sectionView.autoresizingMask = UIViewAutoresizing.FlexibleTopMargin 147 | rotatedView.addSubview(sectionView) 148 | return rotatedView 149 | } 150 | 151 | func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { 152 | if delegate!.respondsToSelector("tableView:viewForHeaderInSection:") { 153 | let sectionView: UIView = delegate!.tableView!(self, viewForHeaderInSection: section)! 154 | return viewToHoldSectionView(sectionView) 155 | } 156 | return nil 157 | } 158 | 159 | func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { 160 | if delegate!.respondsToSelector("tableView:viewForFooterInSection:") { 161 | let sectionView: UIView = delegate!.tableView!(self, viewForFooterInSection: section)! 162 | return viewToHoldSectionView(sectionView) 163 | } 164 | return nil 165 | } 166 | 167 | func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 168 | if delegate!.respondsToSelector("tableView:didSelectRowAtIndexPath:") { 169 | delegate!.tableView!(self, didSelectRowAtIndexPath: indexPath) 170 | } 171 | } 172 | 173 | func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { 174 | if delegate!.respondsToSelector("tableView:widthForCellAtIndexPath:") { 175 | return delegate!.tableView!(self, widthForCellAtIndexPath: indexPath) 176 | } 177 | return tableView.rowHeight 178 | } 179 | 180 | 181 | // MARK: TableView DataSource 182 | 183 | func numberOfSectionsInTableView(tableView: UITableView) -> Int { 184 | if delegate!.respondsToSelector("numberOfSectionsInTableView:") { 185 | return delegate!.numberOfSectionsInTableView!(self) 186 | } 187 | return 1 188 | } 189 | 190 | func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 191 | return delegate!.tableView(self, numberOfRowsInSection: section) 192 | } 193 | 194 | func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { 195 | let cell: UITableViewCell = delegate!.tableView(self, cellForRowAtIndexPath: indexPath) 196 | cell.selectionStyle = UITableViewCellSelectionStyle.None 197 | // Rotate if needed 198 | if CGAffineTransformEqualToTransform(cell.contentView.transform, CGAffineTransformIdentity) { 199 | let xOrigin = (cell.bounds.size.width - cell.bounds.size.height) / 2.0 200 | let yOrigin = (cell.bounds.size.height - cell.bounds.size.width) / 2.0 201 | cell.contentView.frame = CGRectMake(xOrigin, yOrigin, cell.bounds.size.height, cell.bounds.size.width) 202 | cell.contentView.transform = CGAffineTransformMakeRotation(CGFloat(M_PI/2.0)) 203 | } 204 | return cell 205 | } 206 | 207 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/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 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/calendar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "calendar.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/calendar.imageset/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/calendar.imageset/calendar.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/contacts.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "contacts.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/contacts.imageset/contacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/contacts.imageset/contacts.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/finder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "finder.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/finder.imageset/finder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/finder.imageset/finder.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/game-center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "game-center.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/game-center.imageset/game-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/game-center.imageset/game-center.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/health.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "health.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/health.imageset/health.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/health.imageset/health.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/healthbook.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "healthbook.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/healthbook.imageset/healthbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/healthbook.imageset/healthbook.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/ibook.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ibook.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/ibook.imageset/ibook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/ibook.imageset/ibook.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/icloud-drive.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "icloud-drive.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/icloud-drive.imageset/icloud-drive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/icloud-drive.imageset/icloud-drive.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/passbook.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "passbook.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/passbook.imageset/passbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/passbook.imageset/passbook.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/preview.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "preview.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/preview.imageset/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/preview.imageset/preview.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/reminders.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "reminders.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/reminders.imageset/reminders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/reminders.imageset/reminders.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/spotlight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "spotlight.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/spotlight.imageset/spotlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/spotlight.imageset/spotlight.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/textedit.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "textedit.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/textedit.imageset/textedit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/textedit.imageset/textedit.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/tips.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "tips.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/grop0/tips.imageset/tips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/grop0/tips.imageset/tips.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/angry-birds.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "angry-birds.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/angry-birds.imageset/angry-birds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/group1/angry-birds.imageset/angry-birds.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/cut-the-rope.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "cut-the-rope.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/cut-the-rope.imageset/cut-the-rope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/group1/cut-the-rope.imageset/cut-the-rope.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/early-bird.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "early-bird.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/early-bird.imageset/early-bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/group1/early-bird.imageset/early-bird.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/fruit-ninja.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "fruit-ninja.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/fruit-ninja.imageset/fruit-ninja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/group1/fruit-ninja.imageset/fruit-ninja.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/plants-vs-zombies.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "plants-vs-zombies.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HBHorizontalTableView/Images.xcassets/group1/plants-vs-zombies.imageset/plants-vs-zombies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/izyhuang/HBHorizontalTableView/25e7c3d25b81f8f6a270467268e8b271cc0c2206/HBHorizontalTableView/Images.xcassets/group1/plants-vs-zombies.imageset/plants-vs-zombies.png -------------------------------------------------------------------------------- /HBHorizontalTableView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.HuangZhaoyu.$(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 | -------------------------------------------------------------------------------- /HBHorizontalTableViewTests/HBHorizontalTableViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HBHorizontalTableViewTests.swift 3 | // HBHorizontalTableViewTests 4 | // 5 | // Created by 黄招宇 on 15/3/27. 6 | // Copyright (c) 2015年 Huang Zhaoyu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class HBHorizontalTableViewTests: 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.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /HBHorizontalTableViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.HuangZhaoyu.$(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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HBHorizontalTableView 2 | This is a Swift Demo to show a Horizontal TableView just like AppStore. 3 | --------------------------------------------------------------------------------