├── LYFTableViewList.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── LYFTableViewList ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── LYFCollectionView.h ├── LYFCollectionView.m ├── LYFTableView.h ├── LYFTableView.m ├── LYFTableViewHeaderView.h ├── LYFTableViewHeaderView.m ├── LYFViewController.h ├── LYFViewController.m ├── ViewController.h ├── ViewController.m └── main.m ├── LYFTableViewListTests ├── Info.plist └── LYFTableViewListTests.m ├── LYFTableViewListUITests ├── Info.plist └── LYFTableViewListUITests.m └── README.md /LYFTableViewList.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 4B5B2F0E21A80E1400C3D9D8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F0D21A80E1400C3D9D8 /* AppDelegate.m */; }; 11 | 4B5B2F1121A80E1400C3D9D8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F1021A80E1400C3D9D8 /* ViewController.m */; }; 12 | 4B5B2F1421A80E1400C3D9D8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B5B2F1221A80E1400C3D9D8 /* Main.storyboard */; }; 13 | 4B5B2F1621A80E1800C3D9D8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B5B2F1521A80E1800C3D9D8 /* Assets.xcassets */; }; 14 | 4B5B2F1921A80E1800C3D9D8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B5B2F1721A80E1800C3D9D8 /* LaunchScreen.storyboard */; }; 15 | 4B5B2F1C21A80E1800C3D9D8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F1B21A80E1800C3D9D8 /* main.m */; }; 16 | 4B5B2F2621A80E1800C3D9D8 /* LYFTableViewListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F2521A80E1800C3D9D8 /* LYFTableViewListTests.m */; }; 17 | 4B5B2F3121A80E1800C3D9D8 /* LYFTableViewListUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F3021A80E1800C3D9D8 /* LYFTableViewListUITests.m */; }; 18 | 4B5B2F4021A80E3A00C3D9D8 /* LYFTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F3F21A80E3A00C3D9D8 /* LYFTableView.m */; }; 19 | 4B5B2F4321A8127500C3D9D8 /* LYFCollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F4221A8127500C3D9D8 /* LYFCollectionView.m */; }; 20 | 4B5B2F4621A817D300C3D9D8 /* LYFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F4521A817D300C3D9D8 /* LYFViewController.m */; }; 21 | 4B5B2F4921A829E000C3D9D8 /* LYFTableViewHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5B2F4821A829DF00C3D9D8 /* LYFTableViewHeaderView.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 4B5B2F2221A80E1800C3D9D8 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = 4B5B2F0121A80E1400C3D9D8 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 4B5B2F0821A80E1400C3D9D8; 30 | remoteInfo = LYFTableViewList; 31 | }; 32 | 4B5B2F2D21A80E1800C3D9D8 /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 4B5B2F0121A80E1400C3D9D8 /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 4B5B2F0821A80E1400C3D9D8; 37 | remoteInfo = LYFTableViewList; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 4B5B2F0921A80E1400C3D9D8 /* LYFTableViewList.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LYFTableViewList.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 4B5B2F0C21A80E1400C3D9D8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | 4B5B2F0D21A80E1400C3D9D8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | 4B5B2F0F21A80E1400C3D9D8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 46 | 4B5B2F1021A80E1400C3D9D8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 47 | 4B5B2F1321A80E1400C3D9D8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 4B5B2F1521A80E1800C3D9D8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 4B5B2F1821A80E1800C3D9D8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 4B5B2F1A21A80E1800C3D9D8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 4B5B2F1B21A80E1800C3D9D8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 4B5B2F2121A80E1800C3D9D8 /* LYFTableViewListTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LYFTableViewListTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 4B5B2F2521A80E1800C3D9D8 /* LYFTableViewListTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFTableViewListTests.m; sourceTree = ""; }; 54 | 4B5B2F2721A80E1800C3D9D8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 4B5B2F2C21A80E1800C3D9D8 /* LYFTableViewListUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LYFTableViewListUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 4B5B2F3021A80E1800C3D9D8 /* LYFTableViewListUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFTableViewListUITests.m; sourceTree = ""; }; 57 | 4B5B2F3221A80E1800C3D9D8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 4B5B2F3E21A80E3A00C3D9D8 /* LYFTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LYFTableView.h; sourceTree = ""; }; 59 | 4B5B2F3F21A80E3A00C3D9D8 /* LYFTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFTableView.m; sourceTree = ""; }; 60 | 4B5B2F4121A8127500C3D9D8 /* LYFCollectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LYFCollectionView.h; sourceTree = ""; }; 61 | 4B5B2F4221A8127500C3D9D8 /* LYFCollectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFCollectionView.m; sourceTree = ""; }; 62 | 4B5B2F4421A817D300C3D9D8 /* LYFViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LYFViewController.h; sourceTree = ""; }; 63 | 4B5B2F4521A817D300C3D9D8 /* LYFViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFViewController.m; sourceTree = ""; }; 64 | 4B5B2F4721A829DF00C3D9D8 /* LYFTableViewHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LYFTableViewHeaderView.h; sourceTree = ""; }; 65 | 4B5B2F4821A829DF00C3D9D8 /* LYFTableViewHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LYFTableViewHeaderView.m; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | 4B5B2F0621A80E1400C3D9D8 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 4B5B2F1E21A80E1800C3D9D8 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 4B5B2F2921A80E1800C3D9D8 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | ); 88 | runOnlyForDeploymentPostprocessing = 0; 89 | }; 90 | /* End PBXFrameworksBuildPhase section */ 91 | 92 | /* Begin PBXGroup section */ 93 | 4B5B2F0021A80E1400C3D9D8 = { 94 | isa = PBXGroup; 95 | children = ( 96 | 4B5B2F0B21A80E1400C3D9D8 /* LYFTableViewList */, 97 | 4B5B2F2421A80E1800C3D9D8 /* LYFTableViewListTests */, 98 | 4B5B2F2F21A80E1800C3D9D8 /* LYFTableViewListUITests */, 99 | 4B5B2F0A21A80E1400C3D9D8 /* Products */, 100 | ); 101 | sourceTree = ""; 102 | }; 103 | 4B5B2F0A21A80E1400C3D9D8 /* Products */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 4B5B2F0921A80E1400C3D9D8 /* LYFTableViewList.app */, 107 | 4B5B2F2121A80E1800C3D9D8 /* LYFTableViewListTests.xctest */, 108 | 4B5B2F2C21A80E1800C3D9D8 /* LYFTableViewListUITests.xctest */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | 4B5B2F0B21A80E1400C3D9D8 /* LYFTableViewList */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 4B5B2F0C21A80E1400C3D9D8 /* AppDelegate.h */, 117 | 4B5B2F0D21A80E1400C3D9D8 /* AppDelegate.m */, 118 | 4B5B2F0F21A80E1400C3D9D8 /* ViewController.h */, 119 | 4B5B2F1021A80E1400C3D9D8 /* ViewController.m */, 120 | 4B5B2F3E21A80E3A00C3D9D8 /* LYFTableView.h */, 121 | 4B5B2F3F21A80E3A00C3D9D8 /* LYFTableView.m */, 122 | 4B5B2F4721A829DF00C3D9D8 /* LYFTableViewHeaderView.h */, 123 | 4B5B2F4821A829DF00C3D9D8 /* LYFTableViewHeaderView.m */, 124 | 4B5B2F4121A8127500C3D9D8 /* LYFCollectionView.h */, 125 | 4B5B2F4221A8127500C3D9D8 /* LYFCollectionView.m */, 126 | 4B5B2F4421A817D300C3D9D8 /* LYFViewController.h */, 127 | 4B5B2F4521A817D300C3D9D8 /* LYFViewController.m */, 128 | 4B5B2F1221A80E1400C3D9D8 /* Main.storyboard */, 129 | 4B5B2F1521A80E1800C3D9D8 /* Assets.xcassets */, 130 | 4B5B2F1721A80E1800C3D9D8 /* LaunchScreen.storyboard */, 131 | 4B5B2F1A21A80E1800C3D9D8 /* Info.plist */, 132 | 4B5B2F1B21A80E1800C3D9D8 /* main.m */, 133 | ); 134 | path = LYFTableViewList; 135 | sourceTree = ""; 136 | }; 137 | 4B5B2F2421A80E1800C3D9D8 /* LYFTableViewListTests */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 4B5B2F2521A80E1800C3D9D8 /* LYFTableViewListTests.m */, 141 | 4B5B2F2721A80E1800C3D9D8 /* Info.plist */, 142 | ); 143 | path = LYFTableViewListTests; 144 | sourceTree = ""; 145 | }; 146 | 4B5B2F2F21A80E1800C3D9D8 /* LYFTableViewListUITests */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 4B5B2F3021A80E1800C3D9D8 /* LYFTableViewListUITests.m */, 150 | 4B5B2F3221A80E1800C3D9D8 /* Info.plist */, 151 | ); 152 | path = LYFTableViewListUITests; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXNativeTarget section */ 158 | 4B5B2F0821A80E1400C3D9D8 /* LYFTableViewList */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 4B5B2F3521A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewList" */; 161 | buildPhases = ( 162 | 4B5B2F0521A80E1400C3D9D8 /* Sources */, 163 | 4B5B2F0621A80E1400C3D9D8 /* Frameworks */, 164 | 4B5B2F0721A80E1400C3D9D8 /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = LYFTableViewList; 171 | productName = LYFTableViewList; 172 | productReference = 4B5B2F0921A80E1400C3D9D8 /* LYFTableViewList.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | 4B5B2F2021A80E1800C3D9D8 /* LYFTableViewListTests */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 4B5B2F3821A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewListTests" */; 178 | buildPhases = ( 179 | 4B5B2F1D21A80E1800C3D9D8 /* Sources */, 180 | 4B5B2F1E21A80E1800C3D9D8 /* Frameworks */, 181 | 4B5B2F1F21A80E1800C3D9D8 /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | 4B5B2F2321A80E1800C3D9D8 /* PBXTargetDependency */, 187 | ); 188 | name = LYFTableViewListTests; 189 | productName = LYFTableViewListTests; 190 | productReference = 4B5B2F2121A80E1800C3D9D8 /* LYFTableViewListTests.xctest */; 191 | productType = "com.apple.product-type.bundle.unit-test"; 192 | }; 193 | 4B5B2F2B21A80E1800C3D9D8 /* LYFTableViewListUITests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 4B5B2F3B21A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewListUITests" */; 196 | buildPhases = ( 197 | 4B5B2F2821A80E1800C3D9D8 /* Sources */, 198 | 4B5B2F2921A80E1800C3D9D8 /* Frameworks */, 199 | 4B5B2F2A21A80E1800C3D9D8 /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | 4B5B2F2E21A80E1800C3D9D8 /* PBXTargetDependency */, 205 | ); 206 | name = LYFTableViewListUITests; 207 | productName = LYFTableViewListUITests; 208 | productReference = 4B5B2F2C21A80E1800C3D9D8 /* LYFTableViewListUITests.xctest */; 209 | productType = "com.apple.product-type.bundle.ui-testing"; 210 | }; 211 | /* End PBXNativeTarget section */ 212 | 213 | /* Begin PBXProject section */ 214 | 4B5B2F0121A80E1400C3D9D8 /* Project object */ = { 215 | isa = PBXProject; 216 | attributes = { 217 | LastUpgradeCheck = 0940; 218 | ORGANIZATIONNAME = "李玉枫"; 219 | TargetAttributes = { 220 | 4B5B2F0821A80E1400C3D9D8 = { 221 | CreatedOnToolsVersion = 9.4.1; 222 | }; 223 | 4B5B2F2021A80E1800C3D9D8 = { 224 | CreatedOnToolsVersion = 9.4.1; 225 | TestTargetID = 4B5B2F0821A80E1400C3D9D8; 226 | }; 227 | 4B5B2F2B21A80E1800C3D9D8 = { 228 | CreatedOnToolsVersion = 9.4.1; 229 | TestTargetID = 4B5B2F0821A80E1400C3D9D8; 230 | }; 231 | }; 232 | }; 233 | buildConfigurationList = 4B5B2F0421A80E1400C3D9D8 /* Build configuration list for PBXProject "LYFTableViewList" */; 234 | compatibilityVersion = "Xcode 9.3"; 235 | developmentRegion = en; 236 | hasScannedForEncodings = 0; 237 | knownRegions = ( 238 | en, 239 | Base, 240 | ); 241 | mainGroup = 4B5B2F0021A80E1400C3D9D8; 242 | productRefGroup = 4B5B2F0A21A80E1400C3D9D8 /* Products */; 243 | projectDirPath = ""; 244 | projectRoot = ""; 245 | targets = ( 246 | 4B5B2F0821A80E1400C3D9D8 /* LYFTableViewList */, 247 | 4B5B2F2021A80E1800C3D9D8 /* LYFTableViewListTests */, 248 | 4B5B2F2B21A80E1800C3D9D8 /* LYFTableViewListUITests */, 249 | ); 250 | }; 251 | /* End PBXProject section */ 252 | 253 | /* Begin PBXResourcesBuildPhase section */ 254 | 4B5B2F0721A80E1400C3D9D8 /* Resources */ = { 255 | isa = PBXResourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | 4B5B2F1921A80E1800C3D9D8 /* LaunchScreen.storyboard in Resources */, 259 | 4B5B2F1621A80E1800C3D9D8 /* Assets.xcassets in Resources */, 260 | 4B5B2F1421A80E1400C3D9D8 /* Main.storyboard in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 4B5B2F1F21A80E1800C3D9D8 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | 4B5B2F2A21A80E1800C3D9D8 /* Resources */ = { 272 | isa = PBXResourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | /* End PBXResourcesBuildPhase section */ 279 | 280 | /* Begin PBXSourcesBuildPhase section */ 281 | 4B5B2F0521A80E1400C3D9D8 /* Sources */ = { 282 | isa = PBXSourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | 4B5B2F4621A817D300C3D9D8 /* LYFViewController.m in Sources */, 286 | 4B5B2F1121A80E1400C3D9D8 /* ViewController.m in Sources */, 287 | 4B5B2F4321A8127500C3D9D8 /* LYFCollectionView.m in Sources */, 288 | 4B5B2F4921A829E000C3D9D8 /* LYFTableViewHeaderView.m in Sources */, 289 | 4B5B2F1C21A80E1800C3D9D8 /* main.m in Sources */, 290 | 4B5B2F0E21A80E1400C3D9D8 /* AppDelegate.m in Sources */, 291 | 4B5B2F4021A80E3A00C3D9D8 /* LYFTableView.m in Sources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | 4B5B2F1D21A80E1800C3D9D8 /* Sources */ = { 296 | isa = PBXSourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | 4B5B2F2621A80E1800C3D9D8 /* LYFTableViewListTests.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | 4B5B2F2821A80E1800C3D9D8 /* Sources */ = { 304 | isa = PBXSourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | 4B5B2F3121A80E1800C3D9D8 /* LYFTableViewListUITests.m in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXSourcesBuildPhase section */ 312 | 313 | /* Begin PBXTargetDependency section */ 314 | 4B5B2F2321A80E1800C3D9D8 /* PBXTargetDependency */ = { 315 | isa = PBXTargetDependency; 316 | target = 4B5B2F0821A80E1400C3D9D8 /* LYFTableViewList */; 317 | targetProxy = 4B5B2F2221A80E1800C3D9D8 /* PBXContainerItemProxy */; 318 | }; 319 | 4B5B2F2E21A80E1800C3D9D8 /* PBXTargetDependency */ = { 320 | isa = PBXTargetDependency; 321 | target = 4B5B2F0821A80E1400C3D9D8 /* LYFTableViewList */; 322 | targetProxy = 4B5B2F2D21A80E1800C3D9D8 /* PBXContainerItemProxy */; 323 | }; 324 | /* End PBXTargetDependency section */ 325 | 326 | /* Begin PBXVariantGroup section */ 327 | 4B5B2F1221A80E1400C3D9D8 /* Main.storyboard */ = { 328 | isa = PBXVariantGroup; 329 | children = ( 330 | 4B5B2F1321A80E1400C3D9D8 /* Base */, 331 | ); 332 | name = Main.storyboard; 333 | sourceTree = ""; 334 | }; 335 | 4B5B2F1721A80E1800C3D9D8 /* LaunchScreen.storyboard */ = { 336 | isa = PBXVariantGroup; 337 | children = ( 338 | 4B5B2F1821A80E1800C3D9D8 /* Base */, 339 | ); 340 | name = LaunchScreen.storyboard; 341 | sourceTree = ""; 342 | }; 343 | /* End PBXVariantGroup section */ 344 | 345 | /* Begin XCBuildConfiguration section */ 346 | 4B5B2F3321A80E1800C3D9D8 /* Debug */ = { 347 | isa = XCBuildConfiguration; 348 | buildSettings = { 349 | ALWAYS_SEARCH_USER_PATHS = NO; 350 | CLANG_ANALYZER_NONNULL = YES; 351 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 353 | CLANG_CXX_LIBRARY = "libc++"; 354 | CLANG_ENABLE_MODULES = YES; 355 | CLANG_ENABLE_OBJC_ARC = YES; 356 | CLANG_ENABLE_OBJC_WEAK = YES; 357 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_COMMA = YES; 360 | CLANG_WARN_CONSTANT_CONVERSION = YES; 361 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 363 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 364 | CLANG_WARN_EMPTY_BODY = YES; 365 | CLANG_WARN_ENUM_CONVERSION = YES; 366 | CLANG_WARN_INFINITE_RECURSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 369 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 370 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 371 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 372 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 373 | CLANG_WARN_STRICT_PROTOTYPES = YES; 374 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 375 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 376 | CLANG_WARN_UNREACHABLE_CODE = YES; 377 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 378 | CODE_SIGN_IDENTITY = "iPhone Developer"; 379 | COPY_PHASE_STRIP = NO; 380 | DEBUG_INFORMATION_FORMAT = dwarf; 381 | ENABLE_STRICT_OBJC_MSGSEND = YES; 382 | ENABLE_TESTABILITY = YES; 383 | GCC_C_LANGUAGE_STANDARD = gnu11; 384 | GCC_DYNAMIC_NO_PIC = NO; 385 | GCC_NO_COMMON_BLOCKS = YES; 386 | GCC_OPTIMIZATION_LEVEL = 0; 387 | GCC_PREPROCESSOR_DEFINITIONS = ( 388 | "DEBUG=1", 389 | "$(inherited)", 390 | ); 391 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 392 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 393 | GCC_WARN_UNDECLARED_SELECTOR = YES; 394 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 395 | GCC_WARN_UNUSED_FUNCTION = YES; 396 | GCC_WARN_UNUSED_VARIABLE = YES; 397 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 398 | MTL_ENABLE_DEBUG_INFO = YES; 399 | ONLY_ACTIVE_ARCH = YES; 400 | SDKROOT = iphoneos; 401 | }; 402 | name = Debug; 403 | }; 404 | 4B5B2F3421A80E1800C3D9D8 /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ALWAYS_SEARCH_USER_PATHS = NO; 408 | CLANG_ANALYZER_NONNULL = YES; 409 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 411 | CLANG_CXX_LIBRARY = "libc++"; 412 | CLANG_ENABLE_MODULES = YES; 413 | CLANG_ENABLE_OBJC_ARC = YES; 414 | CLANG_ENABLE_OBJC_WEAK = YES; 415 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 416 | CLANG_WARN_BOOL_CONVERSION = YES; 417 | CLANG_WARN_COMMA = YES; 418 | CLANG_WARN_CONSTANT_CONVERSION = YES; 419 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 421 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INFINITE_RECURSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 427 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 428 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 429 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 430 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 431 | CLANG_WARN_STRICT_PROTOTYPES = YES; 432 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 433 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 434 | CLANG_WARN_UNREACHABLE_CODE = YES; 435 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 436 | CODE_SIGN_IDENTITY = "iPhone Developer"; 437 | COPY_PHASE_STRIP = NO; 438 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 439 | ENABLE_NS_ASSERTIONS = NO; 440 | ENABLE_STRICT_OBJC_MSGSEND = YES; 441 | GCC_C_LANGUAGE_STANDARD = gnu11; 442 | GCC_NO_COMMON_BLOCKS = YES; 443 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 444 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 445 | GCC_WARN_UNDECLARED_SELECTOR = YES; 446 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 447 | GCC_WARN_UNUSED_FUNCTION = YES; 448 | GCC_WARN_UNUSED_VARIABLE = YES; 449 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 450 | MTL_ENABLE_DEBUG_INFO = NO; 451 | SDKROOT = iphoneos; 452 | VALIDATE_PRODUCT = YES; 453 | }; 454 | name = Release; 455 | }; 456 | 4B5B2F3621A80E1800C3D9D8 /* Debug */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 460 | CODE_SIGN_STYLE = Automatic; 461 | DEVELOPMENT_TEAM = MPA6552T64; 462 | INFOPLIST_FILE = LYFTableViewList/Info.plist; 463 | LD_RUNPATH_SEARCH_PATHS = ( 464 | "$(inherited)", 465 | "@executable_path/Frameworks", 466 | ); 467 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewList; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | TARGETED_DEVICE_FAMILY = "1,2"; 470 | }; 471 | name = Debug; 472 | }; 473 | 4B5B2F3721A80E1800C3D9D8 /* Release */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 477 | CODE_SIGN_STYLE = Automatic; 478 | DEVELOPMENT_TEAM = MPA6552T64; 479 | INFOPLIST_FILE = LYFTableViewList/Info.plist; 480 | LD_RUNPATH_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "@executable_path/Frameworks", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewList; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | TARGETED_DEVICE_FAMILY = "1,2"; 487 | }; 488 | name = Release; 489 | }; 490 | 4B5B2F3921A80E1800C3D9D8 /* Debug */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | BUNDLE_LOADER = "$(TEST_HOST)"; 494 | CODE_SIGN_STYLE = Automatic; 495 | DEVELOPMENT_TEAM = MPA6552T64; 496 | INFOPLIST_FILE = LYFTableViewListTests/Info.plist; 497 | LD_RUNPATH_SEARCH_PATHS = ( 498 | "$(inherited)", 499 | "@executable_path/Frameworks", 500 | "@loader_path/Frameworks", 501 | ); 502 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewListTests; 503 | PRODUCT_NAME = "$(TARGET_NAME)"; 504 | TARGETED_DEVICE_FAMILY = "1,2"; 505 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LYFTableViewList.app/LYFTableViewList"; 506 | }; 507 | name = Debug; 508 | }; 509 | 4B5B2F3A21A80E1800C3D9D8 /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | BUNDLE_LOADER = "$(TEST_HOST)"; 513 | CODE_SIGN_STYLE = Automatic; 514 | DEVELOPMENT_TEAM = MPA6552T64; 515 | INFOPLIST_FILE = LYFTableViewListTests/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "@executable_path/Frameworks", 519 | "@loader_path/Frameworks", 520 | ); 521 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewListTests; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | TARGETED_DEVICE_FAMILY = "1,2"; 524 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LYFTableViewList.app/LYFTableViewList"; 525 | }; 526 | name = Release; 527 | }; 528 | 4B5B2F3C21A80E1800C3D9D8 /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | CODE_SIGN_STYLE = Automatic; 532 | DEVELOPMENT_TEAM = MPA6552T64; 533 | INFOPLIST_FILE = LYFTableViewListUITests/Info.plist; 534 | LD_RUNPATH_SEARCH_PATHS = ( 535 | "$(inherited)", 536 | "@executable_path/Frameworks", 537 | "@loader_path/Frameworks", 538 | ); 539 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewListUITests; 540 | PRODUCT_NAME = "$(TARGET_NAME)"; 541 | TARGETED_DEVICE_FAMILY = "1,2"; 542 | TEST_TARGET_NAME = LYFTableViewList; 543 | }; 544 | name = Debug; 545 | }; 546 | 4B5B2F3D21A80E1800C3D9D8 /* Release */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | CODE_SIGN_STYLE = Automatic; 550 | DEVELOPMENT_TEAM = MPA6552T64; 551 | INFOPLIST_FILE = LYFTableViewListUITests/Info.plist; 552 | LD_RUNPATH_SEARCH_PATHS = ( 553 | "$(inherited)", 554 | "@executable_path/Frameworks", 555 | "@loader_path/Frameworks", 556 | ); 557 | PRODUCT_BUNDLE_IDENTIFIER = com.LYFTableViewList.LYFTableViewListUITests; 558 | PRODUCT_NAME = "$(TARGET_NAME)"; 559 | TARGETED_DEVICE_FAMILY = "1,2"; 560 | TEST_TARGET_NAME = LYFTableViewList; 561 | }; 562 | name = Release; 563 | }; 564 | /* End XCBuildConfiguration section */ 565 | 566 | /* Begin XCConfigurationList section */ 567 | 4B5B2F0421A80E1400C3D9D8 /* Build configuration list for PBXProject "LYFTableViewList" */ = { 568 | isa = XCConfigurationList; 569 | buildConfigurations = ( 570 | 4B5B2F3321A80E1800C3D9D8 /* Debug */, 571 | 4B5B2F3421A80E1800C3D9D8 /* Release */, 572 | ); 573 | defaultConfigurationIsVisible = 0; 574 | defaultConfigurationName = Release; 575 | }; 576 | 4B5B2F3521A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewList" */ = { 577 | isa = XCConfigurationList; 578 | buildConfigurations = ( 579 | 4B5B2F3621A80E1800C3D9D8 /* Debug */, 580 | 4B5B2F3721A80E1800C3D9D8 /* Release */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | 4B5B2F3821A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewListTests" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | 4B5B2F3921A80E1800C3D9D8 /* Debug */, 589 | 4B5B2F3A21A80E1800C3D9D8 /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | 4B5B2F3B21A80E1800C3D9D8 /* Build configuration list for PBXNativeTarget "LYFTableViewListUITests" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | 4B5B2F3C21A80E1800C3D9D8 /* Debug */, 598 | 4B5B2F3D21A80E1800C3D9D8 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | /* End XCConfigurationList section */ 604 | }; 605 | rootObject = 4B5B2F0121A80E1400C3D9D8 /* Project object */; 606 | } 607 | -------------------------------------------------------------------------------- /LYFTableViewList.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LYFTableViewList/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LYFTableViewList/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /LYFTableViewList/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /LYFTableViewList/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /LYFTableViewList/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LYFTableViewList/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 | -------------------------------------------------------------------------------- /LYFTableViewList/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFCollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LYFCollectionView.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | typedef void(^LYFCollectionViewAction)(CGFloat proportion); 14 | 15 | @interface LYFCollectionView : UICollectionView 16 | 17 | /// 控制器 18 | @property (nonatomic, weak) ViewController *viewController; 19 | /// 横向偏移比例 20 | @property (nonatomic, copy) LYFCollectionViewAction scrollAction; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFCollectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFCollectionView.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "LYFCollectionView.h" 10 | #import "LYFViewController.h" 11 | #import "ViewController.h" 12 | 13 | #define kScreenWidth [[UIScreen mainScreen] bounds].size.width 14 | #define kScreenHeight [[UIScreen mainScreen] bounds].size.height 15 | 16 | @interface LYFCollectionView() 17 | 18 | @end 19 | 20 | static NSString *collectionViewCell = @"UICollectionViewCell"; 21 | 22 | @implementation LYFCollectionView 23 | 24 | -(instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout { 25 | if (self = [super initWithFrame:frame collectionViewLayout:layout]) { 26 | self.dataSource = self; 27 | self.delegate = self; 28 | 29 | self.showsHorizontalScrollIndicator = NO; 30 | self.pagingEnabled = YES; 31 | 32 | [self registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:collectionViewCell]; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | #pragma mark - UICollectionViewDataSource / UICollectionViewDelegate 39 | -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 40 | /// 假设说只有两个控制器左右滑动 41 | return 2; 42 | } 43 | 44 | -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 45 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:collectionViewCell forIndexPath:indexPath]; 46 | 47 | LYFViewController *controller = self.viewController.childViewControllers[indexPath.row]; 48 | controller.view.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 64.f - 50.f); 49 | [cell.contentView addSubview:controller.view]; 50 | 51 | return cell; 52 | } 53 | 54 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView { 55 | if (self.scrollAction) { 56 | self.scrollAction(scrollView.contentOffset.x / kScreenWidth); 57 | } 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableView.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class ViewController; 12 | 13 | typedef void(^LYFTableViewAction)(void); 14 | 15 | @interface LYFTableView : UITableView 16 | 17 | /// 控制器 18 | @property (nonatomic, weak) ViewController *viewController; 19 | /// 滑动事件 20 | @property (nonatomic, copy) LYFTableViewAction scrollAction; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFTableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableView.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "LYFTableView.h" 10 | #import "ViewController.h" 11 | #import "LYFCollectionView.h" 12 | #import "LYFTableViewHeaderView.h" 13 | 14 | #define kScreenWidth [[UIScreen mainScreen] bounds].size.width 15 | #define kScreenHeight [[UIScreen mainScreen] bounds].size.height 16 | 17 | @interface LYFTableView() 18 | 19 | /// 横向的滚动视图 20 | @property (nonatomic, strong) LYFCollectionView *collectionView; 21 | 22 | @end 23 | 24 | static NSString *tableViewCell = @"UITableViewCell"; 25 | static NSString *tableViewHeaderView = @"LYFTableViewHeaderView"; 26 | 27 | @implementation LYFTableView 28 | 29 | -(instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { 30 | if (self = [super initWithFrame:frame style:style]) { 31 | [self setupTableView]; 32 | } 33 | 34 | return self; 35 | } 36 | 37 | #pragma mark - 允许接受多个手势 (这个方法很重要,不要遗漏) 38 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { 39 | return YES; 40 | } 41 | 42 | #pragma mark - 设置列表 43 | -(void)setupTableView { 44 | self.delegate = self; 45 | self.dataSource = self; 46 | /// 64.f 是导航控制器的高度 50.f是列表的section头的高度 47 | self.rowHeight = kScreenHeight - 64.f - 50.f; 48 | 49 | /// 设置tableView的表头 50 | UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 300)]; 51 | headerView.backgroundColor = [UIColor yellowColor]; 52 | /// 0.5是因为刺眼😂 53 | headerView.alpha = 0.5; 54 | self.tableHeaderView = headerView; 55 | 56 | [self registerClass:[LYFTableViewHeaderView class] forHeaderFooterViewReuseIdentifier:tableViewHeaderView]; 57 | 58 | __weak typeof(self) weakSelf = self; 59 | self.collectionView.scrollAction = ^(CGFloat proportion) { 60 | LYFTableViewHeaderView *header = (LYFTableViewHeaderView *)[weakSelf headerViewForSection:0]; 61 | 62 | if (header) { 63 | header.proportion = proportion; 64 | } 65 | }; 66 | } 67 | 68 | #pragma mark - Set方法 69 | -(void)setViewController:(ViewController *)viewController { 70 | _viewController = viewController; 71 | 72 | self.collectionView.viewController = viewController; 73 | } 74 | 75 | #pragma mark - UITableViewDelegate / UITableViewDataSource 76 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 77 | return 1; 78 | } 79 | 80 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:tableViewCell]; 82 | 83 | if (!cell) { 84 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:tableViewCell]; 85 | 86 | /// 在tableViewCell中添加控制器 87 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 88 | [cell.contentView addSubview:self.collectionView]; 89 | } 90 | 91 | return cell; 92 | } 93 | 94 | -(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 95 | LYFTableViewHeaderView *header = [tableView dequeueReusableHeaderFooterViewWithIdentifier:tableViewHeaderView]; 96 | 97 | __weak typeof(self) weakSelf = self; 98 | header.clickAction = ^(NSInteger index) { 99 | switch (index) { 100 | case 1: { 101 | [weakSelf.collectionView setContentOffset:CGPointMake(0, 0) animated:YES]; 102 | break; 103 | } 104 | default: { 105 | [weakSelf.collectionView setContentOffset:CGPointMake(kScreenWidth, 0) animated:YES]; 106 | break; 107 | } 108 | } 109 | }; 110 | 111 | return header; 112 | } 113 | 114 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 115 | return 50.f; 116 | } 117 | 118 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView { 119 | if (self.scrollAction) { 120 | self.scrollAction(); 121 | } 122 | } 123 | 124 | #pragma mark - Get方法 125 | -(LYFCollectionView *)collectionView { 126 | if (!_collectionView) { 127 | UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; 128 | flowLayout.itemSize = CGSizeMake(kScreenWidth, kScreenHeight - 64.f - 50.f); 129 | flowLayout.minimumLineSpacing = 0; 130 | flowLayout.minimumInteritemSpacing = 0; 131 | flowLayout.sectionInset = UIEdgeInsetsZero; 132 | flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal; 133 | 134 | /// 64.f 是导航控制器的高度 50.f是列表的section头的高度 135 | _collectionView = [[LYFCollectionView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - 64 - 50.f) collectionViewLayout:flowLayout]; 136 | } 137 | 138 | return _collectionView; 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFTableViewHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableViewHeaderView.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^LYFTableViewHeaderViewAction)(NSInteger index); 12 | 13 | @interface LYFTableViewHeaderView : UITableViewHeaderFooterView 14 | 15 | /// 比列 16 | @property (nonatomic, assign) CGFloat proportion; 17 | /// 点击事件 18 | @property (nonatomic, copy) LYFTableViewHeaderViewAction clickAction; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFTableViewHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableViewHeaderView.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "LYFTableViewHeaderView.h" 10 | 11 | #define kScreenWidth [[UIScreen mainScreen] bounds].size.width 12 | #define kScreenHeight [[UIScreen mainScreen] bounds].size.height 13 | 14 | @interface LYFTableViewHeaderView() 15 | 16 | /// 按钮1 17 | @property (nonatomic, strong) UIButton *oneButton; 18 | /// 按钮2 19 | @property (nonatomic, strong) UIButton *twoButton; 20 | 21 | @end 22 | 23 | @implementation LYFTableViewHeaderView 24 | 25 | -(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier { 26 | if (self = [super initWithReuseIdentifier:reuseIdentifier]) { 27 | [self setupHeaderView]; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - 设置section头部视图 34 | -(void)setupHeaderView { 35 | [self.contentView addSubview:self.oneButton]; 36 | [self.contentView addSubview:self.twoButton]; 37 | 38 | self.proportion = 0; 39 | } 40 | 41 | #pragma mark - 点击事件 42 | -(void)clickAction:(UIButton *)button { 43 | if (self.clickAction) { 44 | self.clickAction(button.tag); 45 | } 46 | } 47 | 48 | #pragma mark - Set方法 49 | -(void)setProportion:(CGFloat)proportion { 50 | _proportion = proportion; 51 | 52 | CGFloat max = 0.4; 53 | self.oneButton.transform = CGAffineTransformMakeScale(1 + (1 - proportion) * max, 1 + (1 - proportion) * max); 54 | self.twoButton.transform = CGAffineTransformMakeScale(1 + proportion * max, 1 + proportion * max); 55 | 56 | self.oneButton.alpha = (1 - proportion * max); 57 | self.twoButton.alpha = 0.8 + proportion * max; 58 | } 59 | 60 | #pragma mark - Get方法 61 | -(UIButton *)oneButton { 62 | if (!_oneButton) { 63 | _oneButton = [UIButton buttonWithType:UIButtonTypeCustom]; 64 | _oneButton.frame = CGRectMake(0, 0, kScreenWidth / 2, 50.f); 65 | [_oneButton setTitle:@"按钮1" forState:UIControlStateNormal]; 66 | [_oneButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 67 | [_oneButton addTarget:self action:@selector(clickAction:) forControlEvents:UIControlEventTouchUpInside]; 68 | _oneButton.tag = 1; 69 | } 70 | 71 | return _oneButton; 72 | } 73 | 74 | -(UIButton *)twoButton { 75 | if (!_twoButton) { 76 | _twoButton = [UIButton buttonWithType:UIButtonTypeCustom]; 77 | _twoButton.frame = CGRectMake(kScreenWidth / 2, 0, kScreenWidth / 2, 50.f); 78 | [_twoButton setTitle:@"按钮2" forState:UIControlStateNormal]; 79 | [_twoButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 80 | [_twoButton addTarget:self action:@selector(clickAction:) forControlEvents:UIControlEventTouchUpInside]; 81 | _twoButton.tag = 2; 82 | } 83 | 84 | return _twoButton; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LYFViewController.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^LYFViewControllerAction)(void); 12 | 13 | @interface LYFViewController : UIViewController 14 | 15 | /// 列表 16 | @property (nonatomic, strong) UITableView *tableView; 17 | /// 是否可以滑动 18 | @property (nonatomic, assign) BOOL isCanScroll; 19 | /// 不滑动事件 20 | @property (nonatomic, copy) LYFViewControllerAction noScrollAction; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LYFTableViewList/LYFViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFViewController.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "LYFViewController.h" 10 | 11 | #define kScreenWidth [[UIScreen mainScreen] bounds].size.width 12 | #define kScreenHeight [[UIScreen mainScreen] bounds].size.height 13 | 14 | #define random(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)/255.0] 15 | /// 随机色 16 | #define randomColor random(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256)) 17 | 18 | @interface LYFViewController () 19 | 20 | @end 21 | 22 | static NSString *tableViewCell = @"UITableViewCell"; 23 | 24 | @implementation LYFViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | 29 | [self.view addSubview:self.tableView]; 30 | } 31 | 32 | #pragma mark - UITableViewDataSource / UITableViewDelegate 33 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 34 | return 50.f; 35 | } 36 | 37 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 38 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:tableViewCell]; 39 | 40 | if (!cell) { 41 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:tableViewCell]; 42 | cell.contentView.backgroundColor = randomColor; 43 | } 44 | 45 | cell.textLabel.text = [NSString stringWithFormat:@"这里是%ld行", indexPath.row]; 46 | 47 | return cell; 48 | } 49 | 50 | #pragma mark - 滑动方法 51 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView { 52 | if (!self.isCanScroll) { 53 | scrollView.contentOffset = CGPointZero; 54 | } 55 | 56 | /// 当偏移量小于0时,不能滑动,并且使主要视图的UITableView滑动 57 | if (scrollView.contentOffset.y < 0 ) { 58 | self.isCanScroll = NO; 59 | scrollView.contentOffset = CGPointZero; 60 | if (self.noScrollAction) { 61 | self.noScrollAction(); 62 | } 63 | } 64 | } 65 | 66 | #pragma mark - Get方法 67 | -(UITableView *)tableView { 68 | if (!_tableView) { 69 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - 64.f - 50.f) style:UITableViewStylePlain]; 70 | 71 | _tableView.delegate = self; 72 | _tableView.dataSource = self; 73 | 74 | _tableView.rowHeight = 40.f; 75 | } 76 | 77 | return _tableView; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /LYFTableViewList/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LYFTableViewList/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "LYFTableView.h" 11 | #import "LYFViewController.h" 12 | 13 | #define kScreenWidth [[UIScreen mainScreen] bounds].size.width 14 | #define kScreenHeight [[UIScreen mainScreen] bounds].size.height 15 | 16 | @interface ViewController () 17 | 18 | /// 列表(主列表,只有一个cell,用于装UICollectionView) 19 | @property (nonatomic, strong) LYFTableView *tableView; 20 | /// 是否可以滑动 21 | @property (nonatomic, assign) BOOL isCanScroll; 22 | /// 第一个控制器 23 | @property (nonatomic, strong) LYFViewController *lyfVCOne; 24 | /// 第二个控制器 25 | @property (nonatomic, strong) LYFViewController *lyfVCTwo; 26 | 27 | @end 28 | 29 | @implementation ViewController 30 | 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | 34 | self.title = @"列表"; 35 | 36 | self.isCanScroll = YES; 37 | 38 | [self addChildViewController:self.lyfVCOne]; 39 | [self addChildViewController:self.lyfVCTwo]; 40 | 41 | __weak typeof(self) weakSelf = self; 42 | self.lyfVCOne.noScrollAction = ^{ 43 | weakSelf.isCanScroll = YES; 44 | weakSelf.lyfVCTwo.isCanScroll = NO; 45 | weakSelf.lyfVCTwo.tableView.contentOffset = CGPointZero; 46 | }; 47 | 48 | self.lyfVCTwo.noScrollAction = ^{ 49 | weakSelf.isCanScroll = YES; 50 | weakSelf.lyfVCOne.isCanScroll = NO; 51 | weakSelf.lyfVCOne.tableView.contentOffset = CGPointZero; 52 | }; 53 | 54 | self.tableView.scrollAction = ^{ 55 | CGFloat scrollY = [weakSelf.tableView rectForSection:0].origin.y; 56 | if (weakSelf.tableView.contentOffset.y >= scrollY) { 57 | if (weakSelf.isCanScroll == YES) { 58 | weakSelf.isCanScroll = NO; 59 | 60 | weakSelf.lyfVCOne.isCanScroll = YES; 61 | weakSelf.lyfVCOne.tableView.contentOffset = CGPointZero; 62 | weakSelf.lyfVCTwo.isCanScroll = YES; 63 | weakSelf.lyfVCTwo.tableView.contentOffset = CGPointZero; 64 | } 65 | 66 | weakSelf.tableView.contentOffset = CGPointMake(0, scrollY); 67 | }else{ 68 | if (weakSelf.isCanScroll == NO) { 69 | weakSelf.tableView.contentOffset = CGPointMake(0, scrollY); 70 | } 71 | } 72 | }; 73 | 74 | [self.view addSubview:self.tableView]; 75 | } 76 | 77 | #pragma mark - Get方法 78 | -(LYFTableView *)tableView { 79 | if (!_tableView) { 80 | _tableView = [[LYFTableView alloc] initWithFrame:CGRectMake(0, 64.f, kScreenWidth, kScreenHeight - 64.f) style:UITableViewStylePlain]; 81 | /// 把控制器传给tableView,这样逻辑就在view中,viewController显得整齐(个人习惯) 82 | _tableView.viewController = self; 83 | } 84 | 85 | return _tableView; 86 | } 87 | 88 | -(LYFViewController *)lyfVCOne { 89 | if (!_lyfVCOne) { 90 | _lyfVCOne = [[LYFViewController alloc] init]; 91 | } 92 | 93 | return _lyfVCOne; 94 | } 95 | 96 | -(LYFViewController *)lyfVCTwo { 97 | if (!_lyfVCTwo) { 98 | _lyfVCTwo = [[LYFViewController alloc] init]; 99 | } 100 | 101 | return _lyfVCTwo; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /LYFTableViewList/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LYFTableViewList 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LYFTableViewListTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LYFTableViewListTests/LYFTableViewListTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableViewListTests.m 3 | // LYFTableViewListTests 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LYFTableViewListTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LYFTableViewListTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /LYFTableViewListUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LYFTableViewListUITests/LYFTableViewListUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LYFTableViewListUITests.m 3 | // LYFTableViewListUITests 4 | // 5 | // Created by 李玉枫 on 2018/11/23. 6 | // Copyright © 2018 李玉枫. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LYFTableViewListUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LYFTableViewListUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UITableViewNesting 2 | UITableView是大家最常用的控件,在使用的过程中会遇到各种各样的封装和嵌套使用,今天准备给大家分享一个非常常见UITableView嵌套的小功能。 3 | 4 | 大家可以下载看看代码的实现,对大家还是很有帮助的。 5 | 我的简书里有详细的描述:https://www.jianshu.com/p/3d1ec7cf68de 6 | --------------------------------------------------------------------------------