├── .gitignore ├── HorizontalCollectionViews.xcodeproj └── project.pbxproj └── HorizontalCollectionViews ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── HorizontalCollectionViews-Info.plist ├── HorizontalCollectionViews-Prefix.pch ├── ORGAppDelegate.h ├── ORGAppDelegate.m ├── ORGArticleCollectionViewCell.h ├── ORGArticleCollectionViewCell.m ├── ORGArticleCollectionViewCell.xib ├── ORGContainerCell.h ├── ORGContainerCell.m ├── ORGContainerCellView.h ├── ORGContainerCellView.m ├── ORGContainerCellView.xib ├── ORGDetailViewController.h ├── ORGDetailViewController.m ├── ORGMasterViewController.h ├── ORGMasterViewController.m ├── en.lproj ├── InfoPlist.strings ├── ORGDetailViewController.xib └── ORGMasterViewController.xib └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | test-reports/ 19 | *.xcworkspace 20 | -------------------------------------------------------------------------------- /HorizontalCollectionViews.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | E6F322721725826700678247 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F322711725826700678247 /* UIKit.framework */; }; 11 | E6F322741725826700678247 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F322731725826700678247 /* Foundation.framework */; }; 12 | E6F322761725826700678247 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6F322751725826700678247 /* CoreGraphics.framework */; }; 13 | E6F3227C1725826700678247 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E6F3227A1725826700678247 /* InfoPlist.strings */; }; 14 | E6F3227E1725826700678247 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F3227D1725826700678247 /* main.m */; }; 15 | E6F322821725826700678247 /* ORGAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F322811725826700678247 /* ORGAppDelegate.m */; }; 16 | E6F322841725826700678247 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = E6F322831725826700678247 /* Default.png */; }; 17 | E6F322861725826700678247 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E6F322851725826700678247 /* Default@2x.png */; }; 18 | E6F322881725826700678247 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = E6F322871725826700678247 /* Default-568h@2x.png */; }; 19 | E6F3228B1725826700678247 /* ORGMasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F3228A1725826700678247 /* ORGMasterViewController.m */; }; 20 | E6F3228E1725826700678247 /* ORGDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F3228D1725826700678247 /* ORGDetailViewController.m */; }; 21 | E6F322911725826700678247 /* ORGMasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E6F3228F1725826700678247 /* ORGMasterViewController.xib */; }; 22 | E6F322941725826700678247 /* ORGDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E6F322921725826700678247 /* ORGDetailViewController.xib */; }; 23 | E6F3229C1725852400678247 /* ORGContainerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F3229B1725852300678247 /* ORGContainerCell.m */; }; 24 | E6F3229F1725854E00678247 /* ORGContainerCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F3229E1725854E00678247 /* ORGContainerCellView.m */; }; 25 | E6F322A11725856800678247 /* ORGContainerCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E6F322A01725856800678247 /* ORGContainerCellView.xib */; }; 26 | E6F322AC1726D4DF00678247 /* ORGArticleCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F322AB1726D4DE00678247 /* ORGArticleCollectionViewCell.m */; }; 27 | E6F322AE1726D4F900678247 /* ORGArticleCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E6F322AD1726D4F700678247 /* ORGArticleCollectionViewCell.xib */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | E6F3226E1725826700678247 /* HorizontalCollectionViews.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HorizontalCollectionViews.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | E6F322711725826700678247 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 33 | E6F322731725826700678247 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 34 | E6F322751725826700678247 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 35 | E6F322791725826700678247 /* HorizontalCollectionViews-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HorizontalCollectionViews-Info.plist"; sourceTree = ""; }; 36 | E6F3227B1725826700678247 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 37 | E6F3227D1725826700678247 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | E6F3227F1725826700678247 /* HorizontalCollectionViews-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HorizontalCollectionViews-Prefix.pch"; sourceTree = ""; }; 39 | E6F322801725826700678247 /* ORGAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORGAppDelegate.h; sourceTree = ""; }; 40 | E6F322811725826700678247 /* ORGAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORGAppDelegate.m; sourceTree = ""; }; 41 | E6F322831725826700678247 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 42 | E6F322851725826700678247 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 43 | E6F322871725826700678247 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 44 | E6F322891725826700678247 /* ORGMasterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORGMasterViewController.h; sourceTree = ""; }; 45 | E6F3228A1725826700678247 /* ORGMasterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORGMasterViewController.m; sourceTree = ""; }; 46 | E6F3228C1725826700678247 /* ORGDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ORGDetailViewController.h; sourceTree = ""; }; 47 | E6F3228D1725826700678247 /* ORGDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ORGDetailViewController.m; sourceTree = ""; }; 48 | E6F322901725826700678247 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ORGMasterViewController.xib; sourceTree = ""; }; 49 | E6F322931725826700678247 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ORGDetailViewController.xib; sourceTree = ""; }; 50 | E6F3229A1725852300678247 /* ORGContainerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORGContainerCell.h; sourceTree = ""; }; 51 | E6F3229B1725852300678247 /* ORGContainerCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORGContainerCell.m; sourceTree = ""; }; 52 | E6F3229D1725854D00678247 /* ORGContainerCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORGContainerCellView.h; sourceTree = ""; }; 53 | E6F3229E1725854E00678247 /* ORGContainerCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORGContainerCellView.m; sourceTree = ""; }; 54 | E6F322A01725856800678247 /* ORGContainerCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ORGContainerCellView.xib; sourceTree = ""; }; 55 | E6F322AA1726D4DD00678247 /* ORGArticleCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORGArticleCollectionViewCell.h; sourceTree = ""; }; 56 | E6F322AB1726D4DE00678247 /* ORGArticleCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ORGArticleCollectionViewCell.m; sourceTree = ""; }; 57 | E6F322AD1726D4F700678247 /* ORGArticleCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ORGArticleCollectionViewCell.xib; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | E6F3226B1725826700678247 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | E6F322721725826700678247 /* UIKit.framework in Frameworks */, 66 | E6F322741725826700678247 /* Foundation.framework in Frameworks */, 67 | E6F322761725826700678247 /* CoreGraphics.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | E6F322651725826700678247 = { 75 | isa = PBXGroup; 76 | children = ( 77 | E6F322771725826700678247 /* HorizontalCollectionViews */, 78 | E6F322701725826700678247 /* Frameworks */, 79 | E6F3226F1725826700678247 /* Products */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | E6F3226F1725826700678247 /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | E6F3226E1725826700678247 /* HorizontalCollectionViews.app */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | E6F322701725826700678247 /* Frameworks */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | E6F322711725826700678247 /* UIKit.framework */, 95 | E6F322731725826700678247 /* Foundation.framework */, 96 | E6F322751725826700678247 /* CoreGraphics.framework */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | E6F322771725826700678247 /* HorizontalCollectionViews */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | E6F322801725826700678247 /* ORGAppDelegate.h */, 105 | E6F322811725826700678247 /* ORGAppDelegate.m */, 106 | E6F322891725826700678247 /* ORGMasterViewController.h */, 107 | E6F3228A1725826700678247 /* ORGMasterViewController.m */, 108 | E6F3228C1725826700678247 /* ORGDetailViewController.h */, 109 | E6F3228D1725826700678247 /* ORGDetailViewController.m */, 110 | E6F3228F1725826700678247 /* ORGMasterViewController.xib */, 111 | E6F322921725826700678247 /* ORGDetailViewController.xib */, 112 | E6F3229A1725852300678247 /* ORGContainerCell.h */, 113 | E6F3229B1725852300678247 /* ORGContainerCell.m */, 114 | E6F3229D1725854D00678247 /* ORGContainerCellView.h */, 115 | E6F3229E1725854E00678247 /* ORGContainerCellView.m */, 116 | E6F322A01725856800678247 /* ORGContainerCellView.xib */, 117 | E6F322AA1726D4DD00678247 /* ORGArticleCollectionViewCell.h */, 118 | E6F322AB1726D4DE00678247 /* ORGArticleCollectionViewCell.m */, 119 | E6F322AD1726D4F700678247 /* ORGArticleCollectionViewCell.xib */, 120 | E6F322781725826700678247 /* Supporting Files */, 121 | ); 122 | path = HorizontalCollectionViews; 123 | sourceTree = ""; 124 | }; 125 | E6F322781725826700678247 /* Supporting Files */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | E6F322791725826700678247 /* HorizontalCollectionViews-Info.plist */, 129 | E6F3227A1725826700678247 /* InfoPlist.strings */, 130 | E6F3227D1725826700678247 /* main.m */, 131 | E6F3227F1725826700678247 /* HorizontalCollectionViews-Prefix.pch */, 132 | E6F322831725826700678247 /* Default.png */, 133 | E6F322851725826700678247 /* Default@2x.png */, 134 | E6F322871725826700678247 /* Default-568h@2x.png */, 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | E6F3226D1725826700678247 /* HorizontalCollectionViews */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = E6F322971725826700678247 /* Build configuration list for PBXNativeTarget "HorizontalCollectionViews" */; 145 | buildPhases = ( 146 | E6F3226A1725826700678247 /* Sources */, 147 | E6F3226B1725826700678247 /* Frameworks */, 148 | E6F3226C1725826700678247 /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | ); 154 | name = HorizontalCollectionViews; 155 | productName = HorizontalCollectionViews; 156 | productReference = E6F3226E1725826700678247 /* HorizontalCollectionViews.app */; 157 | productType = "com.apple.product-type.application"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | E6F322661725826700678247 /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | CLASSPREFIX = ORG; 166 | LastUpgradeCheck = 0930; 167 | ORGANIZATIONNAME = "OrgSync, LLC"; 168 | }; 169 | buildConfigurationList = E6F322691725826700678247 /* Build configuration list for PBXProject "HorizontalCollectionViews" */; 170 | compatibilityVersion = "Xcode 3.2"; 171 | developmentRegion = English; 172 | hasScannedForEncodings = 0; 173 | knownRegions = ( 174 | en, 175 | ); 176 | mainGroup = E6F322651725826700678247; 177 | productRefGroup = E6F3226F1725826700678247 /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | E6F3226D1725826700678247 /* HorizontalCollectionViews */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | E6F3226C1725826700678247 /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | E6F3227C1725826700678247 /* InfoPlist.strings in Resources */, 192 | E6F322841725826700678247 /* Default.png in Resources */, 193 | E6F322861725826700678247 /* Default@2x.png in Resources */, 194 | E6F322881725826700678247 /* Default-568h@2x.png in Resources */, 195 | E6F322911725826700678247 /* ORGMasterViewController.xib in Resources */, 196 | E6F322941725826700678247 /* ORGDetailViewController.xib in Resources */, 197 | E6F322A11725856800678247 /* ORGContainerCellView.xib in Resources */, 198 | E6F322AE1726D4F900678247 /* ORGArticleCollectionViewCell.xib in Resources */, 199 | ); 200 | runOnlyForDeploymentPostprocessing = 0; 201 | }; 202 | /* End PBXResourcesBuildPhase section */ 203 | 204 | /* Begin PBXSourcesBuildPhase section */ 205 | E6F3226A1725826700678247 /* Sources */ = { 206 | isa = PBXSourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | E6F3227E1725826700678247 /* main.m in Sources */, 210 | E6F322821725826700678247 /* ORGAppDelegate.m in Sources */, 211 | E6F3228B1725826700678247 /* ORGMasterViewController.m in Sources */, 212 | E6F3228E1725826700678247 /* ORGDetailViewController.m in Sources */, 213 | E6F3229C1725852400678247 /* ORGContainerCell.m in Sources */, 214 | E6F3229F1725854E00678247 /* ORGContainerCellView.m in Sources */, 215 | E6F322AC1726D4DF00678247 /* ORGArticleCollectionViewCell.m in Sources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXSourcesBuildPhase section */ 220 | 221 | /* Begin PBXVariantGroup section */ 222 | E6F3227A1725826700678247 /* InfoPlist.strings */ = { 223 | isa = PBXVariantGroup; 224 | children = ( 225 | E6F3227B1725826700678247 /* en */, 226 | ); 227 | name = InfoPlist.strings; 228 | sourceTree = ""; 229 | }; 230 | E6F3228F1725826700678247 /* ORGMasterViewController.xib */ = { 231 | isa = PBXVariantGroup; 232 | children = ( 233 | E6F322901725826700678247 /* en */, 234 | ); 235 | name = ORGMasterViewController.xib; 236 | sourceTree = ""; 237 | }; 238 | E6F322921725826700678247 /* ORGDetailViewController.xib */ = { 239 | isa = PBXVariantGroup; 240 | children = ( 241 | E6F322931725826700678247 /* en */, 242 | ); 243 | name = ORGDetailViewController.xib; 244 | sourceTree = ""; 245 | }; 246 | /* End PBXVariantGroup section */ 247 | 248 | /* Begin XCBuildConfiguration section */ 249 | E6F322951725826700678247 /* Debug */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ALWAYS_SEARCH_USER_PATHS = NO; 253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 257 | CLANG_WARN_BOOL_CONVERSION = YES; 258 | CLANG_WARN_COMMA = YES; 259 | CLANG_WARN_CONSTANT_CONVERSION = YES; 260 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 261 | CLANG_WARN_EMPTY_BODY = YES; 262 | CLANG_WARN_ENUM_CONVERSION = YES; 263 | CLANG_WARN_INFINITE_RECURSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 266 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 267 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 268 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 269 | CLANG_WARN_STRICT_PROTOTYPES = YES; 270 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 271 | CLANG_WARN_UNREACHABLE_CODE = YES; 272 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 273 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 274 | COPY_PHASE_STRIP = NO; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | ENABLE_TESTABILITY = YES; 277 | GCC_C_LANGUAGE_STANDARD = gnu99; 278 | GCC_DYNAMIC_NO_PIC = NO; 279 | GCC_NO_COMMON_BLOCKS = YES; 280 | GCC_OPTIMIZATION_LEVEL = 0; 281 | GCC_PREPROCESSOR_DEFINITIONS = ( 282 | "DEBUG=1", 283 | "$(inherited)", 284 | ); 285 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 286 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 287 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 288 | GCC_WARN_UNDECLARED_SELECTOR = YES; 289 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 290 | GCC_WARN_UNUSED_FUNCTION = YES; 291 | GCC_WARN_UNUSED_VARIABLE = YES; 292 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 293 | ONLY_ACTIVE_ARCH = YES; 294 | SDKROOT = iphoneos; 295 | }; 296 | name = Debug; 297 | }; 298 | E6F322961725826700678247 /* Release */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ALWAYS_SEARCH_USER_PATHS = NO; 302 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 303 | CLANG_CXX_LIBRARY = "libc++"; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 306 | CLANG_WARN_BOOL_CONVERSION = YES; 307 | CLANG_WARN_COMMA = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 310 | CLANG_WARN_EMPTY_BODY = YES; 311 | CLANG_WARN_ENUM_CONVERSION = YES; 312 | CLANG_WARN_INFINITE_RECURSION = YES; 313 | CLANG_WARN_INT_CONVERSION = YES; 314 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 315 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 316 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 317 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 318 | CLANG_WARN_STRICT_PROTOTYPES = YES; 319 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 320 | CLANG_WARN_UNREACHABLE_CODE = YES; 321 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 322 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 323 | COPY_PHASE_STRIP = YES; 324 | ENABLE_STRICT_OBJC_MSGSEND = YES; 325 | GCC_C_LANGUAGE_STANDARD = gnu99; 326 | GCC_NO_COMMON_BLOCKS = YES; 327 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 328 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 329 | GCC_WARN_UNDECLARED_SELECTOR = YES; 330 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 331 | GCC_WARN_UNUSED_FUNCTION = YES; 332 | GCC_WARN_UNUSED_VARIABLE = YES; 333 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 334 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 335 | SDKROOT = iphoneos; 336 | VALIDATE_PRODUCT = YES; 337 | }; 338 | name = Release; 339 | }; 340 | E6F322981725826700678247 /* Debug */ = { 341 | isa = XCBuildConfiguration; 342 | buildSettings = { 343 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 344 | GCC_PREFIX_HEADER = "HorizontalCollectionViews/HorizontalCollectionViews-Prefix.pch"; 345 | INFOPLIST_FILE = "HorizontalCollectionViews/HorizontalCollectionViews-Info.plist"; 346 | PRODUCT_BUNDLE_IDENTIFIER = "com.orgsync.${PRODUCT_NAME:rfc1034identifier}"; 347 | PRODUCT_NAME = "$(TARGET_NAME)"; 348 | WRAPPER_EXTENSION = app; 349 | }; 350 | name = Debug; 351 | }; 352 | E6F322991725826700678247 /* Release */ = { 353 | isa = XCBuildConfiguration; 354 | buildSettings = { 355 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 356 | GCC_PREFIX_HEADER = "HorizontalCollectionViews/HorizontalCollectionViews-Prefix.pch"; 357 | INFOPLIST_FILE = "HorizontalCollectionViews/HorizontalCollectionViews-Info.plist"; 358 | PRODUCT_BUNDLE_IDENTIFIER = "com.orgsync.${PRODUCT_NAME:rfc1034identifier}"; 359 | PRODUCT_NAME = "$(TARGET_NAME)"; 360 | WRAPPER_EXTENSION = app; 361 | }; 362 | name = Release; 363 | }; 364 | /* End XCBuildConfiguration section */ 365 | 366 | /* Begin XCConfigurationList section */ 367 | E6F322691725826700678247 /* Build configuration list for PBXProject "HorizontalCollectionViews" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | E6F322951725826700678247 /* Debug */, 371 | E6F322961725826700678247 /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | E6F322971725826700678247 /* Build configuration list for PBXNativeTarget "HorizontalCollectionViews" */ = { 377 | isa = XCConfigurationList; 378 | buildConfigurations = ( 379 | E6F322981725826700678247 /* Debug */, 380 | E6F322991725826700678247 /* Release */, 381 | ); 382 | defaultConfigurationIsVisible = 0; 383 | defaultConfigurationName = Release; 384 | }; 385 | /* End XCConfigurationList section */ 386 | }; 387 | rootObject = E6F322661725826700678247 /* Project object */; 388 | } 389 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macelangelo/HorizontalCollectionViews/cc695f7b3ce840ebdb6b273c1ca32934ecb6edb7/HorizontalCollectionViews/Default-568h@2x.png -------------------------------------------------------------------------------- /HorizontalCollectionViews/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macelangelo/HorizontalCollectionViews/cc695f7b3ce840ebdb6b273c1ca32934ecb6edb7/HorizontalCollectionViews/Default.png -------------------------------------------------------------------------------- /HorizontalCollectionViews/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/macelangelo/HorizontalCollectionViews/cc695f7b3ce840ebdb6b273c1ca32934ecb6edb7/HorizontalCollectionViews/Default@2x.png -------------------------------------------------------------------------------- /HorizontalCollectionViews/HorizontalCollectionViews-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarTintParameters 32 | 33 | UINavigationBar 34 | 35 | Style 36 | UIBarStyleDefault 37 | Translucent 38 | 39 | 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/HorizontalCollectionViews-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'HorizontalCollectionViews' target in the 'HorizontalCollectionViews' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGAppDelegate.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORGAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | @property (strong, nonatomic) UINavigationController *navigationController; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGAppDelegate.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGAppDelegate.h" 10 | 11 | #import "ORGMasterViewController.h" 12 | 13 | @implementation ORGAppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | // Override point for customization after application launch. 19 | 20 | ORGMasterViewController *masterViewController = [[ORGMasterViewController alloc] initWithNibName:@"ORGMasterViewController" bundle:nil]; 21 | self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController]; 22 | self.window.rootViewController = self.navigationController; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | // 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. 30 | // 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. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application 34 | { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application 40 | { 41 | // 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. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application 45 | { 46 | // 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. 47 | } 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application 50 | { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGArticleCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGArticleCollectionViewCell.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/23/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORGArticleCollectionViewCell : UICollectionViewCell 12 | @property (weak) IBOutlet UIImageView *articleImage; 13 | @property (weak) IBOutlet UILabel *articleTitle; 14 | @end 15 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGArticleCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGArticleCollectionViewCell.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/23/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGArticleCollectionViewCell.h" 10 | #import 11 | 12 | @implementation ORGArticleCollectionViewCell 13 | 14 | - (id)initWithFrame:(CGRect)frame 15 | { 16 | self = [super initWithFrame:frame]; 17 | if (self) { 18 | // Initialization code 19 | } 20 | return self; 21 | } 22 | 23 | 24 | // Only override drawRect: if you perform custom drawing. 25 | // An empty implementation adversely affects performance during animation. 26 | - (void)drawRect:(CGRect)rect 27 | { 28 | // Drawing code 29 | self.layer.borderColor = [[UIColor colorWithRed:180.0/255.0 green:180.0/255.0 blue:180.0/255.0 alpha:1.0] CGColor]; 30 | self.layer.borderWidth = 1.0; 31 | } 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGArticleCollectionViewCell.xib: -------------------------------------------------------------------------------- 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 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGContainerCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGContainerCell.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | @interface ORGContainerCell : UITableViewCell 10 | - (void)setCollectionData:(NSArray *)collectionData; 11 | @end 12 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGContainerCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGContainerCell.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGContainerCell.h" 10 | #import "ORGContainerCellView.h" 11 | 12 | @interface ORGContainerCell () 13 | @property (strong, nonatomic) ORGContainerCellView *collectionView; 14 | @end 15 | 16 | @implementation ORGContainerCell 17 | 18 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 19 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 20 | if (self) { 21 | // Initialization code 22 | _collectionView = [[NSBundle mainBundle] loadNibNamed:@"ORGContainerCellView" owner:self options:nil][0]; 23 | _collectionView.frame = self.bounds; 24 | [self.contentView addSubview:_collectionView]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated 30 | { 31 | [super setSelected:selected animated:animated]; 32 | // Configure the view for the selected state 33 | } 34 | 35 | - (void)setCollectionData:(NSArray *)collectionData { 36 | [_collectionView setCollectionData:collectionData]; 37 | } 38 | 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGContainerCellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGContainerCellView.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORGContainerCellView : UIView 12 | - (void)setCollectionData:(NSArray *)collectionData; 13 | @end 14 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGContainerCellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGContainerCellView.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGContainerCellView.h" 10 | #import "ORGArticleCollectionViewCell.h" 11 | #import 12 | 13 | @interface ORGContainerCellView () 14 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView; 15 | @property (strong, nonatomic) NSArray *collectionData; 16 | @end 17 | 18 | @implementation ORGContainerCellView 19 | 20 | - (void)awakeFromNib { 21 | 22 | [super awakeFromNib]; 23 | 24 | self.collectionView.backgroundColor = [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:1.0]; 25 | 26 | UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; 27 | flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; 28 | flowLayout.itemSize = CGSizeMake(130.0, 170.0); 29 | [self.collectionView setCollectionViewLayout:flowLayout]; 30 | 31 | // Register the colleciton cell 32 | [_collectionView registerNib:[UINib nibWithNibName:@"ORGArticleCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"ORGArticleCollectionViewCell"]; 33 | 34 | } 35 | 36 | /* 37 | // Only override drawRect: if you perform custom drawing. 38 | // An empty implementation adversely affects performance during animation. 39 | - (void)drawRect:(CGRect)rect 40 | { 41 | // Drawing code 42 | } 43 | */ 44 | 45 | #pragma mark - Getter/Setter overrides 46 | - (void)setCollectionData:(NSArray *)collectionData { 47 | _collectionData = collectionData; 48 | [_collectionView setContentOffset:CGPointZero animated:NO]; 49 | [_collectionView reloadData]; 50 | } 51 | 52 | 53 | #pragma mark - UICollectionViewDataSource methods 54 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { 55 | return 1; 56 | } 57 | 58 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 59 | return [self.collectionData count]; 60 | } 61 | 62 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath 63 | { 64 | ORGArticleCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ORGArticleCollectionViewCell" forIndexPath:indexPath]; 65 | NSDictionary *cellData = [self.collectionData objectAtIndex:[indexPath row]]; 66 | cell.articleTitle.text = [cellData objectForKey:@"title"]; 67 | return cell; 68 | } 69 | 70 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 71 | NSDictionary *cellData = [self.collectionData objectAtIndex:[indexPath row]]; 72 | [[NSNotificationCenter defaultCenter] postNotificationName:@"didSelectItemFromCollectionView" object:cellData]; 73 | } 74 | 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGContainerCellView.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGDetailViewController.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ORGDetailViewController : UIViewController 12 | 13 | @property (strong, nonatomic) id detailItem; 14 | 15 | @property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel; 16 | @end 17 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGDetailViewController.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGDetailViewController.h" 10 | 11 | @interface ORGDetailViewController () 12 | - (void)configureView; 13 | @end 14 | 15 | @implementation ORGDetailViewController 16 | 17 | #pragma mark - Managing the detail item 18 | 19 | - (void)setDetailItem:(id)newDetailItem 20 | { 21 | if (_detailItem != newDetailItem) { 22 | _detailItem = newDetailItem; 23 | 24 | // Update the view. 25 | [self configureView]; 26 | } 27 | } 28 | 29 | - (void)configureView 30 | { 31 | // Update the user interface for the detail item. 32 | if (self.detailItem) { 33 | self.detailDescriptionLabel.text = self.detailItem[@"title"]; 34 | } 35 | } 36 | 37 | - (void)viewDidLoad 38 | { 39 | [super viewDidLoad]; 40 | // Do any additional setup after loading the view, typically from a nib. 41 | [self configureView]; 42 | } 43 | 44 | - (void)didReceiveMemoryWarning 45 | { 46 | [super didReceiveMemoryWarning]; 47 | // Dispose of any resources that can be recreated. 48 | } 49 | 50 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 51 | { 52 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 53 | if (self) { 54 | self.title = NSLocalizedString(@"Detail", @"Detail"); 55 | } 56 | return self; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGMasterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ORGMasterViewController.h 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ORGDetailViewController; 12 | 13 | @interface ORGMasterViewController : UITableViewController 14 | 15 | @property (strong, nonatomic) ORGDetailViewController *detailViewController; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/ORGMasterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ORGMasterViewController.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import "ORGMasterViewController.h" 10 | #import "ORGDetailViewController.h" 11 | #import "ORGContainerCell.h" 12 | #import "ORGContainerCellView.h" 13 | 14 | @interface ORGMasterViewController () 15 | //@property (weak, nonatomic) UITableView *tableView; 16 | @property (strong, nonatomic) NSArray *sampleData; 17 | @end 18 | 19 | @implementation ORGMasterViewController 20 | 21 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 22 | { 23 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 24 | if (self) 25 | { 26 | self.title = NSLocalizedString(@"Master", @"Master"); 27 | } 28 | return self; 29 | } 30 | 31 | - (void)viewDidLoad 32 | { 33 | [super viewDidLoad]; 34 | // Do any additional setup after loading the view, typically from a nib. 35 | 36 | self.sampleData = @[ @{ @"description": @"Section A", 37 | @"articles": @[ @{ @"title": @"Article A1" }, 38 | @{ @"title": @"Article A2" }, 39 | @{ @"title": @"Article A3" }, 40 | @{ @"title": @"Article A4" }, 41 | @{ @"title": @"Article A5" } 42 | ] 43 | }, 44 | @{ @"description": @"Section B", 45 | @"articles": @[ @{ @"title": @"Article B1" }, 46 | @{ @"title": @"Article B2" }, 47 | @{ @"title": @"Article B3" }, 48 | @{ @"title": @"Article B4" }, 49 | @{ @"title": @"Article B5" } 50 | ] 51 | }, 52 | @{ @"description": @"Section C", 53 | @"articles": @[ @{ @"title": @"Article C1" }, 54 | @{ @"title": @"Article C2" }, 55 | @{ @"title": @"Article C3" }, 56 | @{ @"title": @"Article C4" }, 57 | @{ @"title": @"Article C5" } 58 | ] 59 | }, 60 | @{ @"description": @"Section D", 61 | @"articles": @[ @{ @"title": @"Article D1" }, 62 | @{ @"title": @"Article D2" }, 63 | @{ @"title": @"Article D3" }, 64 | @{ @"title": @"Article D4" }, 65 | @{ @"title": @"Article D5" } 66 | ] 67 | }, 68 | @{ @"description": @"Section E", 69 | @"articles": @[ @{ @"title": @"Article E1" }, 70 | @{ @"title": @"Article E2" }, 71 | @{ @"title": @"Article E3" }, 72 | @{ @"title": @"Article E4" }, 73 | @{ @"title": @"Article E5" } 74 | ] 75 | }, 76 | @{ @"description": @"Section F", 77 | @"articles": @[ @{ @"title": @"Article F1" }, 78 | @{ @"title": @"Article F2" }, 79 | @{ @"title": @"Article F3" }, 80 | @{ @"title": @"Article F4" }, 81 | @{ @"title": @"Article F5" } 82 | ] 83 | }, 84 | ]; 85 | 86 | // Register the table cell 87 | [self.tableView registerClass:[ORGContainerCell class] forCellReuseIdentifier:@"ORGContainerCell"]; 88 | 89 | [self.tableView setAllowsSelection: NO]; 90 | 91 | // Add observer that will allow the nested collection cell to trigger the view controller select row at index path 92 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didSelectItemFromCollectionView:) name:@"didSelectItemFromCollectionView" object:nil]; 93 | 94 | } 95 | 96 | - (void)didReceiveMemoryWarning 97 | { 98 | [super didReceiveMemoryWarning]; 99 | // Dispose of any resources that can be recreated. 100 | } 101 | 102 | - (void)dealloc 103 | { 104 | [[NSNotificationCenter defaultCenter] removeObserver:self name:@"didSelectItemFromCollectionView" object:nil]; 105 | } 106 | 107 | #pragma mark - Table View 108 | 109 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 110 | { 111 | return [self.sampleData count]; 112 | } 113 | 114 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 115 | { 116 | return 1; 117 | } 118 | 119 | // Customize the appearance of table view cells. 120 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 121 | { 122 | ORGContainerCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ORGContainerCell"]; 123 | NSDictionary *cellData = [self.sampleData objectAtIndex:[indexPath section]]; 124 | NSArray *articleData = [cellData objectForKey:@"articles"]; 125 | [cell setCollectionData:articleData]; 126 | return cell; 127 | } 128 | 129 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath 130 | { 131 | // Return NO if you do not want the specified item to be editable. 132 | return NO; 133 | } 134 | 135 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 136 | { 137 | // This code is commented out in order to allow users to click on the collection view cells. 138 | // if (!self.detailViewController) { 139 | // self.detailViewController = [[ORGDetailViewController alloc] initWithNibName:@"ORGDetailViewController" bundle:nil]; 140 | // } 141 | // NSDate *object = _objects[indexPath.row]; 142 | // self.detailViewController.detailItem = object; 143 | // [self.navigationController pushViewController:self.detailViewController animated:YES]; 144 | } 145 | 146 | #pragma mark UITableViewDelegate methods 147 | 148 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section 149 | { 150 | NSDictionary *sectionData = [self.sampleData objectAtIndex:section]; 151 | NSString *header = [sectionData objectForKey:@"description"]; 152 | return header; 153 | } 154 | 155 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 156 | { 157 | return 20.0; 158 | } 159 | 160 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 161 | { 162 | return 180.0; 163 | } 164 | 165 | #pragma mark - NSNotification to select table cell 166 | 167 | - (void) didSelectItemFromCollectionView:(NSNotification *)notification 168 | { 169 | NSDictionary *cellData = [notification object]; 170 | if (cellData) 171 | { 172 | if (!self.detailViewController) 173 | { 174 | self.detailViewController = [[ORGDetailViewController alloc] initWithNibName:@"ORGDetailViewController" bundle:nil]; 175 | } 176 | self.detailViewController.detailItem = cellData; 177 | [self.navigationController pushViewController:self.detailViewController animated:YES]; 178 | } 179 | } 180 | @end 181 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/en.lproj/ORGDetailViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1536 5 | 12A269 6 | 2835 7 | 1187 8 | 624.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 1919 12 | 13 | 14 | IBNSLayoutConstraint 15 | IBProxyObject 16 | IBUILabel 17 | IBUIView 18 | 19 | 20 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 21 | 22 | 23 | PluginDependencyRecalculationVersion 24 | 25 | 26 | 27 | 28 | IBFilesOwner 29 | IBCocoaTouchFramework 30 | 31 | 32 | IBFirstResponder 33 | IBCocoaTouchFramework 34 | 35 | 36 | 37 | 274 38 | 39 | 40 | 41 | 298 42 | {{20, 265}, {280, 18}} 43 | 44 | 45 | 46 | 47 | 3 48 | MQA 49 | 50 | YES 51 | NO 52 | IBCocoaTouchFramework 53 | Detail view content goes here 54 | 55 | 1 56 | MCAwIDAAA 57 | darkTextColor 58 | 59 | 60 | 1 61 | 10 62 | 1 63 | 64 | 1 65 | 4 66 | 67 | 68 | Helvetica 69 | 14 70 | 16 71 | 72 | 73 | 74 | {{0, 20}, {320, 548}} 75 | 76 | 77 | 78 | 79 | 3 80 | MQA 81 | 82 | 2 83 | 84 | 85 | 86 | 87 | IBUIScreenMetrics 88 | 89 | YES 90 | 91 | 92 | 93 | 94 | 95 | {320, 568} 96 | {568, 320} 97 | 98 | 99 | IBCocoaTouchFramework 100 | Retina 4 Full Screen 101 | 2 102 | 103 | IBCocoaTouchFramework 104 | 105 | 106 | 107 | 108 | 109 | 110 | view 111 | 112 | 113 | 114 | 3 115 | 116 | 117 | 118 | detailDescriptionLabel 119 | 120 | 121 | 122 | 6 123 | 124 | 125 | 126 | 127 | 128 | 0 129 | 130 | 131 | 132 | 133 | 134 | 1 135 | 136 | 137 | 138 | 139 | 10 140 | 0 141 | 142 | 10 143 | 1 144 | 145 | 0.0 146 | 147 | 1000 148 | 149 | 5 150 | 22 151 | 2 152 | 153 | 154 | 155 | 6 156 | 0 157 | 158 | 6 159 | 1 160 | 161 | 20 162 | 163 | 1000 164 | 165 | 8 166 | 29 167 | 3 168 | 169 | 170 | 171 | 5 172 | 0 173 | 174 | 5 175 | 1 176 | 177 | 20 178 | 179 | 1000 180 | 181 | 8 182 | 29 183 | 3 184 | 185 | 186 | 187 | 188 | 189 | 190 | -1 191 | 192 | 193 | File's Owner 194 | 195 | 196 | -2 197 | 198 | 199 | 200 | 201 | 4 202 | 203 | 204 | 205 | 206 | 7 207 | 208 | 209 | 210 | 211 | 9 212 | 213 | 214 | 215 | 216 | 11 217 | 218 | 219 | 220 | 221 | 222 | 223 | ORGDetailViewController 224 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 225 | UIResponder 226 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 227 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 228 | 229 | 230 | 231 | 232 | 233 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 234 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 235 | 236 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 237 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 238 | 239 | 240 | 241 | 242 | 243 | 11 244 | 245 | 246 | 0 247 | IBCocoaTouchFramework 248 | YES 249 | 3 250 | YES 251 | 1919 252 | 253 | 254 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/en.lproj/ORGMasterViewController.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /HorizontalCollectionViews/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HorizontalCollectionViews 4 | // 5 | // Created by James Clark on 4/22/13. 6 | // Copyright (c) 2013 OrgSync, LLC. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ORGAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ORGAppDelegate class])); 17 | } 18 | } 19 | --------------------------------------------------------------------------------