├── .gitignore ├── .swift-version ├── FluentPagination.gif ├── LICENSE ├── Package.swift ├── PagedArray.podspec ├── PagedArray.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── PagedArray tvOS.xcscheme │ ├── PagedArray-iOS.xcscheme │ ├── PagedArray-macOS.xcscheme │ └── PagedArray-watchOS.xcscheme ├── PagedArrayExample.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── PagedArrayExample ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist └── ViewController.swift ├── README.md ├── Sources ├── Info.plist ├── PagedArray.h └── PagedArray.swift └── Tests ├── Info.plist └── PagedArrayTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | 6 | build/ 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | xcuserdata 16 | *.xccheckout 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | *.xcuserstate 22 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 4.1 2 | -------------------------------------------------------------------------------- /FluentPagination.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrAlek/PagedArray/cab1845192f2eae929d3350efac15c95adc83b3a/FluentPagination.gif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Alek Åström 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.2 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "PagedArray", 6 | products: [ 7 | .library(name: "PagedArray", targets: ["PagedArray"]), 8 | ], 9 | targets: [ 10 | .target(name: "PagedArray", path: "Sources"), 11 | .testTarget(name: "PagedArrayTests", dependencies: ["PagedArray"], path: "Tests"), 12 | ] 13 | ) 14 | -------------------------------------------------------------------------------- /PagedArray.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "PagedArray" 3 | s.version = "0.9" 4 | s.summary = "A Swift data structure for easier pagination" 5 | s.description = <<-DESC 6 | PagedArray is a generic Swift data structure for helping 7 | you implement paging mechanisms in (but not limited to) 8 | UITableViews, UICollectionViews and UIPageViewControllers. 9 | DESC 10 | s.homepage = "https://github.com/MrAlek/PagedArray" 11 | s.license = 'MIT' 12 | s.author = { "Alek Åström" => "alek@iosnomad.com" } 13 | s.source = { :git => "https://github.com/MrAlek/PagedArray.git", :tag => s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/MisterAlek' 15 | 16 | s.ios.deployment_target = '8.0' 17 | s.osx.deployment_target = '10.9' 18 | s.watchos.deployment_target = '2.0' 19 | s.tvos.deployment_target = '9.0' 20 | s.requires_arc = true 21 | 22 | s.source_files = 'Sources/*.swift' 23 | s.frameworks = 'Foundation' 24 | 25 | end 26 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 930964571D7C38E400EBA9BE /* PagedArrayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47CFA1AA9E2D3006FF405 /* PagedArrayTests.swift */; }; 11 | 930964581D7C3AFC00EBA9BE /* PagedArray.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 930964401D7C37CD00EBA9BE /* PagedArray.framework */; }; 12 | 930964591D7C3C5400EBA9BE /* PagedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C47CED1AA9E2D2006FF405 /* PagedArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 9309645A1D7C3C8400EBA9BE /* PagedArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47D041AA9E308006FF405 /* PagedArray.swift */; }; 14 | 930964681D7C3D7A00EBA9BE /* PagedArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47D041AA9E308006FF405 /* PagedArray.swift */; }; 15 | 930964691D7C3D7E00EBA9BE /* PagedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C47CED1AA9E2D2006FF405 /* PagedArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 930964791D7C3EC800EBA9BE /* PagedArray.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9309646F1D7C3EC800EBA9BE /* PagedArray.framework */; }; 17 | 930964861D7C3EF700EBA9BE /* PagedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C47CED1AA9E2D2006FF405 /* PagedArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18 | 930964871D7C3EFD00EBA9BE /* PagedArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47D041AA9E308006FF405 /* PagedArray.swift */; }; 19 | 930964881D7C3F0100EBA9BE /* PagedArrayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47CFA1AA9E2D3006FF405 /* PagedArrayTests.swift */; }; 20 | 93C47CEE1AA9E2D2006FF405 /* PagedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C47CED1AA9E2D2006FF405 /* PagedArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; 21 | 93C47CF41AA9E2D3006FF405 /* PagedArray.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93C47CE81AA9E2D2006FF405 /* PagedArray.framework */; }; 22 | 93C47CFB1AA9E2D3006FF405 /* PagedArrayTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47CFA1AA9E2D3006FF405 /* PagedArrayTests.swift */; }; 23 | 93C47D051AA9E308006FF405 /* PagedArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93C47D041AA9E308006FF405 /* PagedArray.swift */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 9309644B1D7C37CD00EBA9BE /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 93C47CDF1AA9E2D2006FF405 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 9309643F1D7C37CD00EBA9BE; 32 | remoteInfo = "PagedArray-tvOS"; 33 | }; 34 | 9309647A1D7C3EC800EBA9BE /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 93C47CDF1AA9E2D2006FF405 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 9309646E1D7C3EC800EBA9BE; 39 | remoteInfo = "PagedArray-macOS"; 40 | }; 41 | 93C47CF51AA9E2D3006FF405 /* PBXContainerItemProxy */ = { 42 | isa = PBXContainerItemProxy; 43 | containerPortal = 93C47CDF1AA9E2D2006FF405 /* Project object */; 44 | proxyType = 1; 45 | remoteGlobalIDString = 93C47CE71AA9E2D2006FF405; 46 | remoteInfo = PagedArray; 47 | }; 48 | /* End PBXContainerItemProxy section */ 49 | 50 | /* Begin PBXFileReference section */ 51 | 930964401D7C37CD00EBA9BE /* PagedArray.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PagedArray.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 930964491D7C37CD00EBA9BE /* PagedArray-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PagedArray-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 930964601D7C3D0800EBA9BE /* PagedArray.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PagedArray.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 9309646F1D7C3EC800EBA9BE /* PagedArray.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PagedArray.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 930964781D7C3EC800EBA9BE /* PagedArray-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PagedArray-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 93C47CE81AA9E2D2006FF405 /* PagedArray.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PagedArray.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 93C47CEC1AA9E2D2006FF405 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 93C47CED1AA9E2D2006FF405 /* PagedArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PagedArray.h; sourceTree = ""; }; 59 | 93C47CF31AA9E2D3006FF405 /* PagedArray-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "PagedArray-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | 93C47CF91AA9E2D3006FF405 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 93C47CFA1AA9E2D3006FF405 /* PagedArrayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PagedArrayTests.swift; sourceTree = ""; }; 62 | 93C47D041AA9E308006FF405 /* PagedArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PagedArray.swift; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | 9309643C1D7C37CD00EBA9BE /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | 930964461D7C37CD00EBA9BE /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | 930964581D7C3AFC00EBA9BE /* PagedArray.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 9309645C1D7C3D0800EBA9BE /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | 9309646B1D7C3EC800EBA9BE /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | 930964751D7C3EC800EBA9BE /* Frameworks */ = { 96 | isa = PBXFrameworksBuildPhase; 97 | buildActionMask = 2147483647; 98 | files = ( 99 | 930964791D7C3EC800EBA9BE /* PagedArray.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 93C47CE41AA9E2D2006FF405 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | ); 108 | runOnlyForDeploymentPostprocessing = 0; 109 | }; 110 | 93C47CF01AA9E2D3006FF405 /* Frameworks */ = { 111 | isa = PBXFrameworksBuildPhase; 112 | buildActionMask = 2147483647; 113 | files = ( 114 | 93C47CF41AA9E2D3006FF405 /* PagedArray.framework in Frameworks */, 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | /* End PBXFrameworksBuildPhase section */ 119 | 120 | /* Begin PBXGroup section */ 121 | 93C47CDE1AA9E2D2006FF405 = { 122 | isa = PBXGroup; 123 | children = ( 124 | 93C47CEA1AA9E2D2006FF405 /* Sources */, 125 | 93C47CF71AA9E2D3006FF405 /* Tests */, 126 | 93C47CE91AA9E2D2006FF405 /* Products */, 127 | ); 128 | sourceTree = ""; 129 | }; 130 | 93C47CE91AA9E2D2006FF405 /* Products */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 93C47CE81AA9E2D2006FF405 /* PagedArray.framework */, 134 | 93C47CF31AA9E2D3006FF405 /* PagedArray-iOSTests.xctest */, 135 | 930964401D7C37CD00EBA9BE /* PagedArray.framework */, 136 | 930964491D7C37CD00EBA9BE /* PagedArray-tvOSTests.xctest */, 137 | 930964601D7C3D0800EBA9BE /* PagedArray.framework */, 138 | 9309646F1D7C3EC800EBA9BE /* PagedArray.framework */, 139 | 930964781D7C3EC800EBA9BE /* PagedArray-macOSTests.xctest */, 140 | ); 141 | name = Products; 142 | sourceTree = ""; 143 | }; 144 | 93C47CEA1AA9E2D2006FF405 /* Sources */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 93C47CED1AA9E2D2006FF405 /* PagedArray.h */, 148 | 93C47D041AA9E308006FF405 /* PagedArray.swift */, 149 | 93C47CEB1AA9E2D2006FF405 /* Supporting Files */, 150 | ); 151 | path = Sources; 152 | sourceTree = ""; 153 | }; 154 | 93C47CEB1AA9E2D2006FF405 /* Supporting Files */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 93C47CEC1AA9E2D2006FF405 /* Info.plist */, 158 | ); 159 | name = "Supporting Files"; 160 | sourceTree = ""; 161 | }; 162 | 93C47CF71AA9E2D3006FF405 /* Tests */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 93C47CFA1AA9E2D3006FF405 /* PagedArrayTests.swift */, 166 | 93C47CF81AA9E2D3006FF405 /* Supporting Files */, 167 | ); 168 | path = Tests; 169 | sourceTree = ""; 170 | }; 171 | 93C47CF81AA9E2D3006FF405 /* Supporting Files */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 93C47CF91AA9E2D3006FF405 /* Info.plist */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | /* End PBXGroup section */ 180 | 181 | /* Begin PBXHeadersBuildPhase section */ 182 | 9309643D1D7C37CD00EBA9BE /* Headers */ = { 183 | isa = PBXHeadersBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 930964591D7C3C5400EBA9BE /* PagedArray.h in Headers */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | 9309645D1D7C3D0800EBA9BE /* Headers */ = { 191 | isa = PBXHeadersBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 930964691D7C3D7E00EBA9BE /* PagedArray.h in Headers */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | 9309646C1D7C3EC800EBA9BE /* Headers */ = { 199 | isa = PBXHeadersBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 930964861D7C3EF700EBA9BE /* PagedArray.h in Headers */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | 93C47CE51AA9E2D2006FF405 /* Headers */ = { 207 | isa = PBXHeadersBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 93C47CEE1AA9E2D2006FF405 /* PagedArray.h in Headers */, 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXHeadersBuildPhase section */ 215 | 216 | /* Begin PBXNativeTarget section */ 217 | 9309643F1D7C37CD00EBA9BE /* PagedArray-tvOS */ = { 218 | isa = PBXNativeTarget; 219 | buildConfigurationList = 930964551D7C37CD00EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-tvOS" */; 220 | buildPhases = ( 221 | 9309643B1D7C37CD00EBA9BE /* Sources */, 222 | 9309643C1D7C37CD00EBA9BE /* Frameworks */, 223 | 9309643D1D7C37CD00EBA9BE /* Headers */, 224 | 9309643E1D7C37CD00EBA9BE /* Resources */, 225 | ); 226 | buildRules = ( 227 | ); 228 | dependencies = ( 229 | ); 230 | name = "PagedArray-tvOS"; 231 | productName = "PagedArray-tvOS"; 232 | productReference = 930964401D7C37CD00EBA9BE /* PagedArray.framework */; 233 | productType = "com.apple.product-type.framework"; 234 | }; 235 | 930964481D7C37CD00EBA9BE /* PagedArray-tvOSTests */ = { 236 | isa = PBXNativeTarget; 237 | buildConfigurationList = 930964561D7C37CD00EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-tvOSTests" */; 238 | buildPhases = ( 239 | 930964451D7C37CD00EBA9BE /* Sources */, 240 | 930964461D7C37CD00EBA9BE /* Frameworks */, 241 | 930964471D7C37CD00EBA9BE /* Resources */, 242 | ); 243 | buildRules = ( 244 | ); 245 | dependencies = ( 246 | 9309644C1D7C37CD00EBA9BE /* PBXTargetDependency */, 247 | ); 248 | name = "PagedArray-tvOSTests"; 249 | productName = "PagedArray-tvOSTests"; 250 | productReference = 930964491D7C37CD00EBA9BE /* PagedArray-tvOSTests.xctest */; 251 | productType = "com.apple.product-type.bundle.unit-test"; 252 | }; 253 | 9309645F1D7C3D0800EBA9BE /* PagedArray-watchOS */ = { 254 | isa = PBXNativeTarget; 255 | buildConfigurationList = 930964671D7C3D0800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-watchOS" */; 256 | buildPhases = ( 257 | 9309645B1D7C3D0800EBA9BE /* Sources */, 258 | 9309645C1D7C3D0800EBA9BE /* Frameworks */, 259 | 9309645D1D7C3D0800EBA9BE /* Headers */, 260 | 9309645E1D7C3D0800EBA9BE /* Resources */, 261 | ); 262 | buildRules = ( 263 | ); 264 | dependencies = ( 265 | ); 266 | name = "PagedArray-watchOS"; 267 | productName = "PagedArray-watchOS"; 268 | productReference = 930964601D7C3D0800EBA9BE /* PagedArray.framework */; 269 | productType = "com.apple.product-type.framework"; 270 | }; 271 | 9309646E1D7C3EC800EBA9BE /* PagedArray-macOS */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 930964801D7C3EC800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-macOS" */; 274 | buildPhases = ( 275 | 9309646A1D7C3EC800EBA9BE /* Sources */, 276 | 9309646B1D7C3EC800EBA9BE /* Frameworks */, 277 | 9309646C1D7C3EC800EBA9BE /* Headers */, 278 | 9309646D1D7C3EC800EBA9BE /* Resources */, 279 | ); 280 | buildRules = ( 281 | ); 282 | dependencies = ( 283 | ); 284 | name = "PagedArray-macOS"; 285 | productName = "PagedArray-macOS"; 286 | productReference = 9309646F1D7C3EC800EBA9BE /* PagedArray.framework */; 287 | productType = "com.apple.product-type.framework"; 288 | }; 289 | 930964771D7C3EC800EBA9BE /* PagedArray-macOSTests */ = { 290 | isa = PBXNativeTarget; 291 | buildConfigurationList = 930964831D7C3EC800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-macOSTests" */; 292 | buildPhases = ( 293 | 930964741D7C3EC800EBA9BE /* Sources */, 294 | 930964751D7C3EC800EBA9BE /* Frameworks */, 295 | 930964761D7C3EC800EBA9BE /* Resources */, 296 | ); 297 | buildRules = ( 298 | ); 299 | dependencies = ( 300 | 9309647B1D7C3EC800EBA9BE /* PBXTargetDependency */, 301 | ); 302 | name = "PagedArray-macOSTests"; 303 | productName = "PagedArray-macOSTests"; 304 | productReference = 930964781D7C3EC800EBA9BE /* PagedArray-macOSTests.xctest */; 305 | productType = "com.apple.product-type.bundle.unit-test"; 306 | }; 307 | 93C47CE71AA9E2D2006FF405 /* PagedArray-iOS */ = { 308 | isa = PBXNativeTarget; 309 | buildConfigurationList = 93C47CFE1AA9E2D3006FF405 /* Build configuration list for PBXNativeTarget "PagedArray-iOS" */; 310 | buildPhases = ( 311 | 93C47CE31AA9E2D2006FF405 /* Sources */, 312 | 93C47CE41AA9E2D2006FF405 /* Frameworks */, 313 | 93C47CE51AA9E2D2006FF405 /* Headers */, 314 | 93C47CE61AA9E2D2006FF405 /* Resources */, 315 | ); 316 | buildRules = ( 317 | ); 318 | dependencies = ( 319 | ); 320 | name = "PagedArray-iOS"; 321 | productName = PagedArray; 322 | productReference = 93C47CE81AA9E2D2006FF405 /* PagedArray.framework */; 323 | productType = "com.apple.product-type.framework"; 324 | }; 325 | 93C47CF21AA9E2D3006FF405 /* PagedArray-iOSTests */ = { 326 | isa = PBXNativeTarget; 327 | buildConfigurationList = 93C47D011AA9E2D3006FF405 /* Build configuration list for PBXNativeTarget "PagedArray-iOSTests" */; 328 | buildPhases = ( 329 | 93C47CEF1AA9E2D3006FF405 /* Sources */, 330 | 93C47CF01AA9E2D3006FF405 /* Frameworks */, 331 | 93C47CF11AA9E2D3006FF405 /* Resources */, 332 | ); 333 | buildRules = ( 334 | ); 335 | dependencies = ( 336 | 93C47CF61AA9E2D3006FF405 /* PBXTargetDependency */, 337 | ); 338 | name = "PagedArray-iOSTests"; 339 | productName = PagedArrayTests; 340 | productReference = 93C47CF31AA9E2D3006FF405 /* PagedArray-iOSTests.xctest */; 341 | productType = "com.apple.product-type.bundle.unit-test"; 342 | }; 343 | /* End PBXNativeTarget section */ 344 | 345 | /* Begin PBXProject section */ 346 | 93C47CDF1AA9E2D2006FF405 /* Project object */ = { 347 | isa = PBXProject; 348 | attributes = { 349 | LastSwiftUpdateCheck = 0700; 350 | LastUpgradeCheck = 1110; 351 | ORGANIZATIONNAME = "Apps and Wonders"; 352 | TargetAttributes = { 353 | 9309643F1D7C37CD00EBA9BE = { 354 | CreatedOnToolsVersion = 7.3.1; 355 | LastSwiftMigration = 1110; 356 | }; 357 | 930964481D7C37CD00EBA9BE = { 358 | CreatedOnToolsVersion = 7.3.1; 359 | LastSwiftMigration = 1110; 360 | }; 361 | 9309645F1D7C3D0800EBA9BE = { 362 | CreatedOnToolsVersion = 7.3.1; 363 | LastSwiftMigration = 1110; 364 | }; 365 | 9309646E1D7C3EC800EBA9BE = { 366 | CreatedOnToolsVersion = 7.3.1; 367 | LastSwiftMigration = 1110; 368 | ProvisioningStyle = Automatic; 369 | }; 370 | 930964771D7C3EC800EBA9BE = { 371 | CreatedOnToolsVersion = 7.3.1; 372 | LastSwiftMigration = 1110; 373 | }; 374 | 93C47CE71AA9E2D2006FF405 = { 375 | CreatedOnToolsVersion = 6.3; 376 | LastSwiftMigration = 1110; 377 | }; 378 | 93C47CF21AA9E2D3006FF405 = { 379 | CreatedOnToolsVersion = 6.3; 380 | LastSwiftMigration = 1110; 381 | }; 382 | }; 383 | }; 384 | buildConfigurationList = 93C47CE21AA9E2D2006FF405 /* Build configuration list for PBXProject "PagedArray" */; 385 | compatibilityVersion = "Xcode 3.2"; 386 | developmentRegion = en; 387 | hasScannedForEncodings = 0; 388 | knownRegions = ( 389 | en, 390 | ); 391 | mainGroup = 93C47CDE1AA9E2D2006FF405; 392 | productRefGroup = 93C47CE91AA9E2D2006FF405 /* Products */; 393 | projectDirPath = ""; 394 | projectRoot = ""; 395 | targets = ( 396 | 93C47CE71AA9E2D2006FF405 /* PagedArray-iOS */, 397 | 93C47CF21AA9E2D3006FF405 /* PagedArray-iOSTests */, 398 | 9309643F1D7C37CD00EBA9BE /* PagedArray-tvOS */, 399 | 930964481D7C37CD00EBA9BE /* PagedArray-tvOSTests */, 400 | 9309645F1D7C3D0800EBA9BE /* PagedArray-watchOS */, 401 | 9309646E1D7C3EC800EBA9BE /* PagedArray-macOS */, 402 | 930964771D7C3EC800EBA9BE /* PagedArray-macOSTests */, 403 | ); 404 | }; 405 | /* End PBXProject section */ 406 | 407 | /* Begin PBXResourcesBuildPhase section */ 408 | 9309643E1D7C37CD00EBA9BE /* Resources */ = { 409 | isa = PBXResourcesBuildPhase; 410 | buildActionMask = 2147483647; 411 | files = ( 412 | ); 413 | runOnlyForDeploymentPostprocessing = 0; 414 | }; 415 | 930964471D7C37CD00EBA9BE /* Resources */ = { 416 | isa = PBXResourcesBuildPhase; 417 | buildActionMask = 2147483647; 418 | files = ( 419 | ); 420 | runOnlyForDeploymentPostprocessing = 0; 421 | }; 422 | 9309645E1D7C3D0800EBA9BE /* Resources */ = { 423 | isa = PBXResourcesBuildPhase; 424 | buildActionMask = 2147483647; 425 | files = ( 426 | ); 427 | runOnlyForDeploymentPostprocessing = 0; 428 | }; 429 | 9309646D1D7C3EC800EBA9BE /* Resources */ = { 430 | isa = PBXResourcesBuildPhase; 431 | buildActionMask = 2147483647; 432 | files = ( 433 | ); 434 | runOnlyForDeploymentPostprocessing = 0; 435 | }; 436 | 930964761D7C3EC800EBA9BE /* Resources */ = { 437 | isa = PBXResourcesBuildPhase; 438 | buildActionMask = 2147483647; 439 | files = ( 440 | ); 441 | runOnlyForDeploymentPostprocessing = 0; 442 | }; 443 | 93C47CE61AA9E2D2006FF405 /* Resources */ = { 444 | isa = PBXResourcesBuildPhase; 445 | buildActionMask = 2147483647; 446 | files = ( 447 | ); 448 | runOnlyForDeploymentPostprocessing = 0; 449 | }; 450 | 93C47CF11AA9E2D3006FF405 /* Resources */ = { 451 | isa = PBXResourcesBuildPhase; 452 | buildActionMask = 2147483647; 453 | files = ( 454 | ); 455 | runOnlyForDeploymentPostprocessing = 0; 456 | }; 457 | /* End PBXResourcesBuildPhase section */ 458 | 459 | /* Begin PBXSourcesBuildPhase section */ 460 | 9309643B1D7C37CD00EBA9BE /* Sources */ = { 461 | isa = PBXSourcesBuildPhase; 462 | buildActionMask = 2147483647; 463 | files = ( 464 | 9309645A1D7C3C8400EBA9BE /* PagedArray.swift in Sources */, 465 | ); 466 | runOnlyForDeploymentPostprocessing = 0; 467 | }; 468 | 930964451D7C37CD00EBA9BE /* Sources */ = { 469 | isa = PBXSourcesBuildPhase; 470 | buildActionMask = 2147483647; 471 | files = ( 472 | 930964571D7C38E400EBA9BE /* PagedArrayTests.swift in Sources */, 473 | ); 474 | runOnlyForDeploymentPostprocessing = 0; 475 | }; 476 | 9309645B1D7C3D0800EBA9BE /* Sources */ = { 477 | isa = PBXSourcesBuildPhase; 478 | buildActionMask = 2147483647; 479 | files = ( 480 | 930964681D7C3D7A00EBA9BE /* PagedArray.swift in Sources */, 481 | ); 482 | runOnlyForDeploymentPostprocessing = 0; 483 | }; 484 | 9309646A1D7C3EC800EBA9BE /* Sources */ = { 485 | isa = PBXSourcesBuildPhase; 486 | buildActionMask = 2147483647; 487 | files = ( 488 | 930964871D7C3EFD00EBA9BE /* PagedArray.swift in Sources */, 489 | ); 490 | runOnlyForDeploymentPostprocessing = 0; 491 | }; 492 | 930964741D7C3EC800EBA9BE /* Sources */ = { 493 | isa = PBXSourcesBuildPhase; 494 | buildActionMask = 2147483647; 495 | files = ( 496 | 930964881D7C3F0100EBA9BE /* PagedArrayTests.swift in Sources */, 497 | ); 498 | runOnlyForDeploymentPostprocessing = 0; 499 | }; 500 | 93C47CE31AA9E2D2006FF405 /* Sources */ = { 501 | isa = PBXSourcesBuildPhase; 502 | buildActionMask = 2147483647; 503 | files = ( 504 | 93C47D051AA9E308006FF405 /* PagedArray.swift in Sources */, 505 | ); 506 | runOnlyForDeploymentPostprocessing = 0; 507 | }; 508 | 93C47CEF1AA9E2D3006FF405 /* Sources */ = { 509 | isa = PBXSourcesBuildPhase; 510 | buildActionMask = 2147483647; 511 | files = ( 512 | 93C47CFB1AA9E2D3006FF405 /* PagedArrayTests.swift in Sources */, 513 | ); 514 | runOnlyForDeploymentPostprocessing = 0; 515 | }; 516 | /* End PBXSourcesBuildPhase section */ 517 | 518 | /* Begin PBXTargetDependency section */ 519 | 9309644C1D7C37CD00EBA9BE /* PBXTargetDependency */ = { 520 | isa = PBXTargetDependency; 521 | target = 9309643F1D7C37CD00EBA9BE /* PagedArray-tvOS */; 522 | targetProxy = 9309644B1D7C37CD00EBA9BE /* PBXContainerItemProxy */; 523 | }; 524 | 9309647B1D7C3EC800EBA9BE /* PBXTargetDependency */ = { 525 | isa = PBXTargetDependency; 526 | target = 9309646E1D7C3EC800EBA9BE /* PagedArray-macOS */; 527 | targetProxy = 9309647A1D7C3EC800EBA9BE /* PBXContainerItemProxy */; 528 | }; 529 | 93C47CF61AA9E2D3006FF405 /* PBXTargetDependency */ = { 530 | isa = PBXTargetDependency; 531 | target = 93C47CE71AA9E2D2006FF405 /* PagedArray-iOS */; 532 | targetProxy = 93C47CF51AA9E2D3006FF405 /* PBXContainerItemProxy */; 533 | }; 534 | /* End PBXTargetDependency section */ 535 | 536 | /* Begin XCBuildConfiguration section */ 537 | 930964511D7C37CD00EBA9BE /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | CLANG_ANALYZER_NONNULL = YES; 541 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 542 | DEFINES_MODULE = YES; 543 | DYLIB_COMPATIBILITY_VERSION = 1; 544 | DYLIB_CURRENT_VERSION = 1; 545 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 546 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 547 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 549 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-tvOS"; 550 | PRODUCT_NAME = PagedArray; 551 | SDKROOT = appletvos; 552 | SKIP_INSTALL = YES; 553 | SWIFT_VERSION = 5.0; 554 | TARGETED_DEVICE_FAMILY = 3; 555 | TVOS_DEPLOYMENT_TARGET = 9.0; 556 | }; 557 | name = Debug; 558 | }; 559 | 930964521D7C37CD00EBA9BE /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | CLANG_ANALYZER_NONNULL = YES; 563 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 564 | DEFINES_MODULE = YES; 565 | DYLIB_COMPATIBILITY_VERSION = 1; 566 | DYLIB_CURRENT_VERSION = 1; 567 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 568 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 569 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 570 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 571 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-tvOS"; 572 | PRODUCT_NAME = PagedArray; 573 | SDKROOT = appletvos; 574 | SKIP_INSTALL = YES; 575 | SWIFT_VERSION = 5.0; 576 | TARGETED_DEVICE_FAMILY = 3; 577 | TVOS_DEPLOYMENT_TARGET = 9.0; 578 | }; 579 | name = Release; 580 | }; 581 | 930964531D7C37CD00EBA9BE /* Debug */ = { 582 | isa = XCBuildConfiguration; 583 | buildSettings = { 584 | CLANG_ANALYZER_NONNULL = YES; 585 | INFOPLIST_FILE = Tests/Info.plist; 586 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 587 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-tvOSTests"; 588 | PRODUCT_NAME = "PagedArray-tvOSTests"; 589 | SDKROOT = appletvos; 590 | SWIFT_VERSION = 5.0; 591 | TARGETED_DEVICE_FAMILY = 3; 592 | TVOS_DEPLOYMENT_TARGET = 9.2; 593 | }; 594 | name = Debug; 595 | }; 596 | 930964541D7C37CD00EBA9BE /* Release */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | CLANG_ANALYZER_NONNULL = YES; 600 | INFOPLIST_FILE = Tests/Info.plist; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 602 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-tvOSTests"; 603 | PRODUCT_NAME = "PagedArray-tvOSTests"; 604 | SDKROOT = appletvos; 605 | SWIFT_VERSION = 5.0; 606 | TARGETED_DEVICE_FAMILY = 3; 607 | TVOS_DEPLOYMENT_TARGET = 9.2; 608 | }; 609 | name = Release; 610 | }; 611 | 930964651D7C3D0800EBA9BE /* Debug */ = { 612 | isa = XCBuildConfiguration; 613 | buildSettings = { 614 | APPLICATION_EXTENSION_API_ONLY = YES; 615 | CLANG_ANALYZER_NONNULL = YES; 616 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 617 | DEFINES_MODULE = YES; 618 | DYLIB_COMPATIBILITY_VERSION = 1; 619 | DYLIB_CURRENT_VERSION = 1; 620 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 621 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 622 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 623 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 624 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-watchOS"; 625 | PRODUCT_NAME = PagedArray; 626 | SDKROOT = watchos; 627 | SKIP_INSTALL = YES; 628 | SWIFT_VERSION = 5.0; 629 | TARGETED_DEVICE_FAMILY = 4; 630 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 631 | }; 632 | name = Debug; 633 | }; 634 | 930964661D7C3D0800EBA9BE /* Release */ = { 635 | isa = XCBuildConfiguration; 636 | buildSettings = { 637 | APPLICATION_EXTENSION_API_ONLY = YES; 638 | CLANG_ANALYZER_NONNULL = YES; 639 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 640 | DEFINES_MODULE = YES; 641 | DYLIB_COMPATIBILITY_VERSION = 1; 642 | DYLIB_CURRENT_VERSION = 1; 643 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 644 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 645 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 646 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 647 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-watchOS"; 648 | PRODUCT_NAME = PagedArray; 649 | SDKROOT = watchos; 650 | SKIP_INSTALL = YES; 651 | SWIFT_VERSION = 5.0; 652 | TARGETED_DEVICE_FAMILY = 4; 653 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 654 | }; 655 | name = Release; 656 | }; 657 | 930964811D7C3EC800EBA9BE /* Debug */ = { 658 | isa = XCBuildConfiguration; 659 | buildSettings = { 660 | CLANG_ANALYZER_NONNULL = YES; 661 | CODE_SIGN_IDENTITY = ""; 662 | COMBINE_HIDPI_IMAGES = YES; 663 | DEFINES_MODULE = YES; 664 | DYLIB_COMPATIBILITY_VERSION = 1; 665 | DYLIB_CURRENT_VERSION = 1; 666 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 667 | FRAMEWORK_VERSION = A; 668 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 669 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 670 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 671 | MACOSX_DEPLOYMENT_TARGET = 10.9; 672 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-macOS"; 673 | PRODUCT_NAME = PagedArray; 674 | SDKROOT = macosx; 675 | SKIP_INSTALL = YES; 676 | SWIFT_VERSION = 5.0; 677 | }; 678 | name = Debug; 679 | }; 680 | 930964821D7C3EC800EBA9BE /* Release */ = { 681 | isa = XCBuildConfiguration; 682 | buildSettings = { 683 | CLANG_ANALYZER_NONNULL = YES; 684 | CODE_SIGN_IDENTITY = ""; 685 | COMBINE_HIDPI_IMAGES = YES; 686 | DEFINES_MODULE = YES; 687 | DYLIB_COMPATIBILITY_VERSION = 1; 688 | DYLIB_CURRENT_VERSION = 1; 689 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 690 | FRAMEWORK_VERSION = A; 691 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 692 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 693 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 694 | MACOSX_DEPLOYMENT_TARGET = 10.9; 695 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-macOS"; 696 | PRODUCT_NAME = PagedArray; 697 | SDKROOT = macosx; 698 | SKIP_INSTALL = YES; 699 | SWIFT_VERSION = 5.0; 700 | }; 701 | name = Release; 702 | }; 703 | 930964841D7C3EC800EBA9BE /* Debug */ = { 704 | isa = XCBuildConfiguration; 705 | buildSettings = { 706 | CLANG_ANALYZER_NONNULL = YES; 707 | CODE_SIGN_IDENTITY = "-"; 708 | COMBINE_HIDPI_IMAGES = YES; 709 | INFOPLIST_FILE = Tests/Info.plist; 710 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 711 | MACOSX_DEPLOYMENT_TARGET = 10.11; 712 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-macOSTests"; 713 | PRODUCT_NAME = "$(TARGET_NAME)"; 714 | SDKROOT = macosx; 715 | SWIFT_VERSION = 5.0; 716 | }; 717 | name = Debug; 718 | }; 719 | 930964851D7C3EC800EBA9BE /* Release */ = { 720 | isa = XCBuildConfiguration; 721 | buildSettings = { 722 | CLANG_ANALYZER_NONNULL = YES; 723 | CODE_SIGN_IDENTITY = "-"; 724 | COMBINE_HIDPI_IMAGES = YES; 725 | INFOPLIST_FILE = Tests/Info.plist; 726 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 727 | MACOSX_DEPLOYMENT_TARGET = 10.11; 728 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.PagedArray-macOSTests"; 729 | PRODUCT_NAME = "$(TARGET_NAME)"; 730 | SDKROOT = macosx; 731 | SWIFT_VERSION = 5.0; 732 | }; 733 | name = Release; 734 | }; 735 | 93C47CFC1AA9E2D3006FF405 /* Debug */ = { 736 | isa = XCBuildConfiguration; 737 | buildSettings = { 738 | ALWAYS_SEARCH_USER_PATHS = NO; 739 | APPLICATION_EXTENSION_API_ONLY = YES; 740 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 741 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 742 | CLANG_CXX_LIBRARY = "libc++"; 743 | CLANG_ENABLE_MODULES = YES; 744 | CLANG_ENABLE_OBJC_ARC = YES; 745 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 746 | CLANG_WARN_BOOL_CONVERSION = YES; 747 | CLANG_WARN_COMMA = YES; 748 | CLANG_WARN_CONSTANT_CONVERSION = YES; 749 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 750 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 751 | CLANG_WARN_EMPTY_BODY = YES; 752 | CLANG_WARN_ENUM_CONVERSION = YES; 753 | CLANG_WARN_INFINITE_RECURSION = YES; 754 | CLANG_WARN_INT_CONVERSION = YES; 755 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 756 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 757 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 758 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 759 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 760 | CLANG_WARN_STRICT_PROTOTYPES = YES; 761 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 762 | CLANG_WARN_UNREACHABLE_CODE = YES; 763 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 764 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 765 | COPY_PHASE_STRIP = NO; 766 | CURRENT_PROJECT_VERSION = 1; 767 | DEBUG_INFORMATION_FORMAT = dwarf; 768 | ENABLE_STRICT_OBJC_MSGSEND = YES; 769 | ENABLE_TESTABILITY = YES; 770 | GCC_C_LANGUAGE_STANDARD = gnu99; 771 | GCC_DYNAMIC_NO_PIC = NO; 772 | GCC_NO_COMMON_BLOCKS = YES; 773 | GCC_OPTIMIZATION_LEVEL = 0; 774 | GCC_PREPROCESSOR_DEFINITIONS = ( 775 | "DEBUG=1", 776 | "$(inherited)", 777 | ); 778 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 779 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 780 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 781 | GCC_WARN_UNDECLARED_SELECTOR = YES; 782 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 783 | GCC_WARN_UNUSED_FUNCTION = YES; 784 | GCC_WARN_UNUSED_VARIABLE = YES; 785 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 786 | MACOSX_DEPLOYMENT_TARGET = 10.9; 787 | MTL_ENABLE_DEBUG_INFO = YES; 788 | ONLY_ACTIVE_ARCH = YES; 789 | SDKROOT = iphoneos; 790 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 791 | SWIFT_VERSION = 4.0; 792 | TARGETED_DEVICE_FAMILY = "1,2"; 793 | VERSIONING_SYSTEM = "apple-generic"; 794 | VERSION_INFO_PREFIX = ""; 795 | }; 796 | name = Debug; 797 | }; 798 | 93C47CFD1AA9E2D3006FF405 /* Release */ = { 799 | isa = XCBuildConfiguration; 800 | buildSettings = { 801 | ALWAYS_SEARCH_USER_PATHS = NO; 802 | APPLICATION_EXTENSION_API_ONLY = YES; 803 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 804 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 805 | CLANG_CXX_LIBRARY = "libc++"; 806 | CLANG_ENABLE_MODULES = YES; 807 | CLANG_ENABLE_OBJC_ARC = YES; 808 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 809 | CLANG_WARN_BOOL_CONVERSION = YES; 810 | CLANG_WARN_COMMA = YES; 811 | CLANG_WARN_CONSTANT_CONVERSION = YES; 812 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 813 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 814 | CLANG_WARN_EMPTY_BODY = YES; 815 | CLANG_WARN_ENUM_CONVERSION = YES; 816 | CLANG_WARN_INFINITE_RECURSION = YES; 817 | CLANG_WARN_INT_CONVERSION = YES; 818 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 819 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 820 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 821 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 822 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 823 | CLANG_WARN_STRICT_PROTOTYPES = YES; 824 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 825 | CLANG_WARN_UNREACHABLE_CODE = YES; 826 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 827 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 828 | COPY_PHASE_STRIP = NO; 829 | CURRENT_PROJECT_VERSION = 1; 830 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 831 | ENABLE_NS_ASSERTIONS = NO; 832 | ENABLE_STRICT_OBJC_MSGSEND = YES; 833 | GCC_C_LANGUAGE_STANDARD = gnu99; 834 | GCC_NO_COMMON_BLOCKS = YES; 835 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 836 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 837 | GCC_WARN_UNDECLARED_SELECTOR = YES; 838 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 839 | GCC_WARN_UNUSED_FUNCTION = YES; 840 | GCC_WARN_UNUSED_VARIABLE = YES; 841 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 842 | MACOSX_DEPLOYMENT_TARGET = 10.9; 843 | MTL_ENABLE_DEBUG_INFO = NO; 844 | SDKROOT = iphoneos; 845 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 846 | SWIFT_VERSION = 4.0; 847 | TARGETED_DEVICE_FAMILY = "1,2"; 848 | VALIDATE_PRODUCT = YES; 849 | VERSIONING_SYSTEM = "apple-generic"; 850 | VERSION_INFO_PREFIX = ""; 851 | }; 852 | name = Release; 853 | }; 854 | 93C47CFF1AA9E2D3006FF405 /* Debug */ = { 855 | isa = XCBuildConfiguration; 856 | buildSettings = { 857 | CLANG_ENABLE_MODULES = YES; 858 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 859 | DEFINES_MODULE = YES; 860 | DYLIB_COMPATIBILITY_VERSION = 1; 861 | DYLIB_CURRENT_VERSION = 1; 862 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 863 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 864 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 865 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 866 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 867 | PRODUCT_NAME = PagedArray; 868 | SKIP_INSTALL = YES; 869 | SWIFT_VERSION = 5.0; 870 | }; 871 | name = Debug; 872 | }; 873 | 93C47D001AA9E2D3006FF405 /* Release */ = { 874 | isa = XCBuildConfiguration; 875 | buildSettings = { 876 | CLANG_ENABLE_MODULES = YES; 877 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 878 | DEFINES_MODULE = YES; 879 | DYLIB_COMPATIBILITY_VERSION = 1; 880 | DYLIB_CURRENT_VERSION = 1; 881 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 882 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 883 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 884 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 885 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 886 | PRODUCT_NAME = PagedArray; 887 | SKIP_INSTALL = YES; 888 | SWIFT_VERSION = 5.0; 889 | }; 890 | name = Release; 891 | }; 892 | 93C47D021AA9E2D3006FF405 /* Debug */ = { 893 | isa = XCBuildConfiguration; 894 | buildSettings = { 895 | APPLICATION_EXTENSION_API_ONLY = NO; 896 | GCC_PREPROCESSOR_DEFINITIONS = ( 897 | "DEBUG=1", 898 | "$(inherited)", 899 | ); 900 | INFOPLIST_FILE = Tests/Info.plist; 901 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 902 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 903 | PRODUCT_NAME = "$(TARGET_NAME)"; 904 | SWIFT_VERSION = 5.0; 905 | }; 906 | name = Debug; 907 | }; 908 | 93C47D031AA9E2D3006FF405 /* Release */ = { 909 | isa = XCBuildConfiguration; 910 | buildSettings = { 911 | APPLICATION_EXTENSION_API_ONLY = NO; 912 | INFOPLIST_FILE = Tests/Info.plist; 913 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 914 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 915 | PRODUCT_NAME = "$(TARGET_NAME)"; 916 | SWIFT_VERSION = 5.0; 917 | }; 918 | name = Release; 919 | }; 920 | /* End XCBuildConfiguration section */ 921 | 922 | /* Begin XCConfigurationList section */ 923 | 930964551D7C37CD00EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-tvOS" */ = { 924 | isa = XCConfigurationList; 925 | buildConfigurations = ( 926 | 930964511D7C37CD00EBA9BE /* Debug */, 927 | 930964521D7C37CD00EBA9BE /* Release */, 928 | ); 929 | defaultConfigurationIsVisible = 0; 930 | defaultConfigurationName = Release; 931 | }; 932 | 930964561D7C37CD00EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-tvOSTests" */ = { 933 | isa = XCConfigurationList; 934 | buildConfigurations = ( 935 | 930964531D7C37CD00EBA9BE /* Debug */, 936 | 930964541D7C37CD00EBA9BE /* Release */, 937 | ); 938 | defaultConfigurationIsVisible = 0; 939 | defaultConfigurationName = Release; 940 | }; 941 | 930964671D7C3D0800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-watchOS" */ = { 942 | isa = XCConfigurationList; 943 | buildConfigurations = ( 944 | 930964651D7C3D0800EBA9BE /* Debug */, 945 | 930964661D7C3D0800EBA9BE /* Release */, 946 | ); 947 | defaultConfigurationIsVisible = 0; 948 | defaultConfigurationName = Release; 949 | }; 950 | 930964801D7C3EC800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-macOS" */ = { 951 | isa = XCConfigurationList; 952 | buildConfigurations = ( 953 | 930964811D7C3EC800EBA9BE /* Debug */, 954 | 930964821D7C3EC800EBA9BE /* Release */, 955 | ); 956 | defaultConfigurationIsVisible = 0; 957 | defaultConfigurationName = Release; 958 | }; 959 | 930964831D7C3EC800EBA9BE /* Build configuration list for PBXNativeTarget "PagedArray-macOSTests" */ = { 960 | isa = XCConfigurationList; 961 | buildConfigurations = ( 962 | 930964841D7C3EC800EBA9BE /* Debug */, 963 | 930964851D7C3EC800EBA9BE /* Release */, 964 | ); 965 | defaultConfigurationIsVisible = 0; 966 | defaultConfigurationName = Release; 967 | }; 968 | 93C47CE21AA9E2D2006FF405 /* Build configuration list for PBXProject "PagedArray" */ = { 969 | isa = XCConfigurationList; 970 | buildConfigurations = ( 971 | 93C47CFC1AA9E2D3006FF405 /* Debug */, 972 | 93C47CFD1AA9E2D3006FF405 /* Release */, 973 | ); 974 | defaultConfigurationIsVisible = 0; 975 | defaultConfigurationName = Release; 976 | }; 977 | 93C47CFE1AA9E2D3006FF405 /* Build configuration list for PBXNativeTarget "PagedArray-iOS" */ = { 978 | isa = XCConfigurationList; 979 | buildConfigurations = ( 980 | 93C47CFF1AA9E2D3006FF405 /* Debug */, 981 | 93C47D001AA9E2D3006FF405 /* Release */, 982 | ); 983 | defaultConfigurationIsVisible = 0; 984 | defaultConfigurationName = Release; 985 | }; 986 | 93C47D011AA9E2D3006FF405 /* Build configuration list for PBXNativeTarget "PagedArray-iOSTests" */ = { 987 | isa = XCConfigurationList; 988 | buildConfigurations = ( 989 | 93C47D021AA9E2D3006FF405 /* Debug */, 990 | 93C47D031AA9E2D3006FF405 /* Release */, 991 | ); 992 | defaultConfigurationIsVisible = 0; 993 | defaultConfigurationName = Release; 994 | }; 995 | /* End XCConfigurationList section */ 996 | }; 997 | rootObject = 93C47CDF1AA9E2D2006FF405 /* Project object */; 998 | } 999 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/xcshareddata/xcschemes/PagedArray tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/xcshareddata/xcschemes/PagedArray-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 76 | 77 | 83 | 84 | 85 | 86 | 92 | 93 | 99 | 100 | 101 | 102 | 104 | 105 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/xcshareddata/xcschemes/PagedArray-macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /PagedArray.xcodeproj/xcshareddata/xcschemes/PagedArray-watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 52 | 53 | 59 | 60 | 66 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /PagedArrayExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 93BDA84E1AAB736600BAED02 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BDA84D1AAB736600BAED02 /* AppDelegate.swift */; }; 11 | 93BDA8501AAB736600BAED02 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93BDA84F1AAB736600BAED02 /* ViewController.swift */; }; 12 | 93BDA8531AAB736600BAED02 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 93BDA8511AAB736600BAED02 /* Main.storyboard */; }; 13 | 93BDA8551AAB736600BAED02 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 93BDA8541AAB736600BAED02 /* Images.xcassets */; }; 14 | 93BDA8581AAB736600BAED02 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93BDA8561AAB736600BAED02 /* LaunchScreen.xib */; }; 15 | 93BDA8781AAB73F000BAED02 /* PagedArray.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93BDA8731AAB73DC00BAED02 /* PagedArray.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 9337ED3D1EE73E6700A15DCB /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 22 | proxyType = 2; 23 | remoteGlobalIDString = 930964401D7C37CD00EBA9BE; 24 | remoteInfo = "PagedArray-tvOS"; 25 | }; 26 | 9337ED3F1EE73E6700A15DCB /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 29 | proxyType = 2; 30 | remoteGlobalIDString = 930964491D7C37CD00EBA9BE; 31 | remoteInfo = "PagedArray-tvOSTests"; 32 | }; 33 | 9337ED411EE73E6700A15DCB /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 36 | proxyType = 2; 37 | remoteGlobalIDString = 930964601D7C3D0800EBA9BE; 38 | remoteInfo = "PagedArray-watchOS"; 39 | }; 40 | 9337ED431EE73E6700A15DCB /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 43 | proxyType = 2; 44 | remoteGlobalIDString = 9309646F1D7C3EC800EBA9BE; 45 | remoteInfo = "PagedArray-macOS"; 46 | }; 47 | 9337ED451EE73E6700A15DCB /* PBXContainerItemProxy */ = { 48 | isa = PBXContainerItemProxy; 49 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 50 | proxyType = 2; 51 | remoteGlobalIDString = 930964781D7C3EC800EBA9BE; 52 | remoteInfo = "PagedArray-macOSTests"; 53 | }; 54 | 93BDA8721AAB73DC00BAED02 /* PBXContainerItemProxy */ = { 55 | isa = PBXContainerItemProxy; 56 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 57 | proxyType = 2; 58 | remoteGlobalIDString = 93C47CE81AA9E2D2006FF405; 59 | remoteInfo = PagedArray; 60 | }; 61 | 93BDA8741AAB73DC00BAED02 /* PBXContainerItemProxy */ = { 62 | isa = PBXContainerItemProxy; 63 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 64 | proxyType = 2; 65 | remoteGlobalIDString = 93C47CF31AA9E2D3006FF405; 66 | remoteInfo = PagedArrayTests; 67 | }; 68 | 93BDA8761AAB73EA00BAED02 /* PBXContainerItemProxy */ = { 69 | isa = PBXContainerItemProxy; 70 | containerPortal = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 71 | proxyType = 1; 72 | remoteGlobalIDString = 93C47CE71AA9E2D2006FF405; 73 | remoteInfo = PagedArray; 74 | }; 75 | /* End PBXContainerItemProxy section */ 76 | 77 | /* Begin PBXFileReference section */ 78 | 93BDA8481AAB736600BAED02 /* PagedArrayExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PagedArrayExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | 93BDA84C1AAB736600BAED02 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 80 | 93BDA84D1AAB736600BAED02 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 81 | 93BDA84F1AAB736600BAED02 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 82 | 93BDA8521AAB736600BAED02 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 83 | 93BDA8541AAB736600BAED02 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 84 | 93BDA8571AAB736600BAED02 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 85 | 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = PagedArray.xcodeproj; sourceTree = ""; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 93BDA8451AAB736600BAED02 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | 93BDA8781AAB73F000BAED02 /* PagedArray.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | /* End PBXFrameworksBuildPhase section */ 98 | 99 | /* Begin PBXGroup section */ 100 | 93BDA83F1AAB736600BAED02 = { 101 | isa = PBXGroup; 102 | children = ( 103 | 93BDA84A1AAB736600BAED02 /* PagedArrayExample */, 104 | 93BDA8491AAB736600BAED02 /* Products */, 105 | 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */, 106 | ); 107 | sourceTree = ""; 108 | }; 109 | 93BDA8491AAB736600BAED02 /* Products */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 93BDA8481AAB736600BAED02 /* PagedArrayExample.app */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 93BDA84A1AAB736600BAED02 /* PagedArrayExample */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 93BDA84D1AAB736600BAED02 /* AppDelegate.swift */, 121 | 93BDA84F1AAB736600BAED02 /* ViewController.swift */, 122 | 93BDA8511AAB736600BAED02 /* Main.storyboard */, 123 | 93BDA8541AAB736600BAED02 /* Images.xcassets */, 124 | 93BDA8561AAB736600BAED02 /* LaunchScreen.xib */, 125 | 93BDA84B1AAB736600BAED02 /* Supporting Files */, 126 | ); 127 | path = PagedArrayExample; 128 | sourceTree = ""; 129 | }; 130 | 93BDA84B1AAB736600BAED02 /* Supporting Files */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 93BDA84C1AAB736600BAED02 /* Info.plist */, 134 | ); 135 | name = "Supporting Files"; 136 | sourceTree = ""; 137 | }; 138 | 93BDA86E1AAB73DC00BAED02 /* Products */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 93BDA8731AAB73DC00BAED02 /* PagedArray.framework */, 142 | 93BDA8751AAB73DC00BAED02 /* PagedArray-iOSTests.xctest */, 143 | 9337ED3E1EE73E6700A15DCB /* PagedArray.framework */, 144 | 9337ED401EE73E6700A15DCB /* PagedArray-tvOSTests.xctest */, 145 | 9337ED421EE73E6700A15DCB /* PagedArray.framework */, 146 | 9337ED441EE73E6700A15DCB /* PagedArray.framework */, 147 | 9337ED461EE73E6700A15DCB /* PagedArray-macOSTests.xctest */, 148 | ); 149 | name = Products; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | 93BDA8471AAB736600BAED02 /* PagedArrayExample */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = 93BDA8671AAB736600BAED02 /* Build configuration list for PBXNativeTarget "PagedArrayExample" */; 158 | buildPhases = ( 159 | 93BDA8441AAB736600BAED02 /* Sources */, 160 | 93BDA8451AAB736600BAED02 /* Frameworks */, 161 | 93BDA8461AAB736600BAED02 /* Resources */, 162 | ); 163 | buildRules = ( 164 | ); 165 | dependencies = ( 166 | 93BDA8771AAB73EA00BAED02 /* PBXTargetDependency */, 167 | ); 168 | name = PagedArrayExample; 169 | productName = PagedArrayExample; 170 | productReference = 93BDA8481AAB736600BAED02 /* PagedArrayExample.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | /* End PBXNativeTarget section */ 174 | 175 | /* Begin PBXProject section */ 176 | 93BDA8401AAB736600BAED02 /* Project object */ = { 177 | isa = PBXProject; 178 | attributes = { 179 | LastSwiftUpdateCheck = 0700; 180 | LastUpgradeCheck = 1110; 181 | ORGANIZATIONNAME = "Apps and Wonders"; 182 | TargetAttributes = { 183 | 93BDA8471AAB736600BAED02 = { 184 | CreatedOnToolsVersion = 6.3; 185 | LastSwiftMigration = 1110; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 93BDA8431AAB736600BAED02 /* Build configuration list for PBXProject "PagedArrayExample" */; 190 | compatibilityVersion = "Xcode 3.2"; 191 | developmentRegion = en; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = 93BDA83F1AAB736600BAED02; 198 | productRefGroup = 93BDA8491AAB736600BAED02 /* Products */; 199 | projectDirPath = ""; 200 | projectReferences = ( 201 | { 202 | ProductGroup = 93BDA86E1AAB73DC00BAED02 /* Products */; 203 | ProjectRef = 93BDA86D1AAB73DC00BAED02 /* PagedArray.xcodeproj */; 204 | }, 205 | ); 206 | projectRoot = ""; 207 | targets = ( 208 | 93BDA8471AAB736600BAED02 /* PagedArrayExample */, 209 | ); 210 | }; 211 | /* End PBXProject section */ 212 | 213 | /* Begin PBXReferenceProxy section */ 214 | 9337ED3E1EE73E6700A15DCB /* PagedArray.framework */ = { 215 | isa = PBXReferenceProxy; 216 | fileType = wrapper.framework; 217 | path = PagedArray.framework; 218 | remoteRef = 9337ED3D1EE73E6700A15DCB /* PBXContainerItemProxy */; 219 | sourceTree = BUILT_PRODUCTS_DIR; 220 | }; 221 | 9337ED401EE73E6700A15DCB /* PagedArray-tvOSTests.xctest */ = { 222 | isa = PBXReferenceProxy; 223 | fileType = wrapper.cfbundle; 224 | path = "PagedArray-tvOSTests.xctest"; 225 | remoteRef = 9337ED3F1EE73E6700A15DCB /* PBXContainerItemProxy */; 226 | sourceTree = BUILT_PRODUCTS_DIR; 227 | }; 228 | 9337ED421EE73E6700A15DCB /* PagedArray.framework */ = { 229 | isa = PBXReferenceProxy; 230 | fileType = wrapper.framework; 231 | path = PagedArray.framework; 232 | remoteRef = 9337ED411EE73E6700A15DCB /* PBXContainerItemProxy */; 233 | sourceTree = BUILT_PRODUCTS_DIR; 234 | }; 235 | 9337ED441EE73E6700A15DCB /* PagedArray.framework */ = { 236 | isa = PBXReferenceProxy; 237 | fileType = wrapper.framework; 238 | path = PagedArray.framework; 239 | remoteRef = 9337ED431EE73E6700A15DCB /* PBXContainerItemProxy */; 240 | sourceTree = BUILT_PRODUCTS_DIR; 241 | }; 242 | 9337ED461EE73E6700A15DCB /* PagedArray-macOSTests.xctest */ = { 243 | isa = PBXReferenceProxy; 244 | fileType = wrapper.cfbundle; 245 | path = "PagedArray-macOSTests.xctest"; 246 | remoteRef = 9337ED451EE73E6700A15DCB /* PBXContainerItemProxy */; 247 | sourceTree = BUILT_PRODUCTS_DIR; 248 | }; 249 | 93BDA8731AAB73DC00BAED02 /* PagedArray.framework */ = { 250 | isa = PBXReferenceProxy; 251 | fileType = wrapper.framework; 252 | path = PagedArray.framework; 253 | remoteRef = 93BDA8721AAB73DC00BAED02 /* PBXContainerItemProxy */; 254 | sourceTree = BUILT_PRODUCTS_DIR; 255 | }; 256 | 93BDA8751AAB73DC00BAED02 /* PagedArray-iOSTests.xctest */ = { 257 | isa = PBXReferenceProxy; 258 | fileType = wrapper.cfbundle; 259 | path = "PagedArray-iOSTests.xctest"; 260 | remoteRef = 93BDA8741AAB73DC00BAED02 /* PBXContainerItemProxy */; 261 | sourceTree = BUILT_PRODUCTS_DIR; 262 | }; 263 | /* End PBXReferenceProxy section */ 264 | 265 | /* Begin PBXResourcesBuildPhase section */ 266 | 93BDA8461AAB736600BAED02 /* Resources */ = { 267 | isa = PBXResourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 93BDA8531AAB736600BAED02 /* Main.storyboard in Resources */, 271 | 93BDA8581AAB736600BAED02 /* LaunchScreen.xib in Resources */, 272 | 93BDA8551AAB736600BAED02 /* Images.xcassets in Resources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXResourcesBuildPhase section */ 277 | 278 | /* Begin PBXSourcesBuildPhase section */ 279 | 93BDA8441AAB736600BAED02 /* Sources */ = { 280 | isa = PBXSourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 93BDA8501AAB736600BAED02 /* ViewController.swift in Sources */, 284 | 93BDA84E1AAB736600BAED02 /* AppDelegate.swift in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | /* End PBXSourcesBuildPhase section */ 289 | 290 | /* Begin PBXTargetDependency section */ 291 | 93BDA8771AAB73EA00BAED02 /* PBXTargetDependency */ = { 292 | isa = PBXTargetDependency; 293 | name = PagedArray; 294 | targetProxy = 93BDA8761AAB73EA00BAED02 /* PBXContainerItemProxy */; 295 | }; 296 | /* End PBXTargetDependency section */ 297 | 298 | /* Begin PBXVariantGroup section */ 299 | 93BDA8511AAB736600BAED02 /* Main.storyboard */ = { 300 | isa = PBXVariantGroup; 301 | children = ( 302 | 93BDA8521AAB736600BAED02 /* Base */, 303 | ); 304 | name = Main.storyboard; 305 | sourceTree = ""; 306 | }; 307 | 93BDA8561AAB736600BAED02 /* LaunchScreen.xib */ = { 308 | isa = PBXVariantGroup; 309 | children = ( 310 | 93BDA8571AAB736600BAED02 /* Base */, 311 | ); 312 | name = LaunchScreen.xib; 313 | sourceTree = ""; 314 | }; 315 | /* End PBXVariantGroup section */ 316 | 317 | /* Begin XCBuildConfiguration section */ 318 | 93BDA8651AAB736600BAED02 /* Debug */ = { 319 | isa = XCBuildConfiguration; 320 | buildSettings = { 321 | ALWAYS_SEARCH_USER_PATHS = NO; 322 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_COMMA = YES; 330 | CLANG_WARN_CONSTANT_CONVERSION = YES; 331 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INFINITE_RECURSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 342 | CLANG_WARN_STRICT_PROTOTYPES = YES; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = NO; 348 | DEBUG_INFORMATION_FORMAT = dwarf; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | ENABLE_TESTABILITY = YES; 351 | GCC_C_LANGUAGE_STANDARD = gnu99; 352 | GCC_DYNAMIC_NO_PIC = NO; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_OPTIMIZATION_LEVEL = 0; 355 | GCC_PREPROCESSOR_DEFINITIONS = ( 356 | "DEBUG=1", 357 | "$(inherited)", 358 | ); 359 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 360 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 361 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 362 | GCC_WARN_UNDECLARED_SELECTOR = YES; 363 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 364 | GCC_WARN_UNUSED_FUNCTION = YES; 365 | GCC_WARN_UNUSED_VARIABLE = YES; 366 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 367 | MTL_ENABLE_DEBUG_INFO = YES; 368 | ONLY_ACTIVE_ARCH = YES; 369 | SDKROOT = iphoneos; 370 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Debug; 374 | }; 375 | 93BDA8661AAB736600BAED02 /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | buildSettings = { 378 | ALWAYS_SEARCH_USER_PATHS = NO; 379 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_COMMA = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_EMPTY_BODY = YES; 391 | CLANG_WARN_ENUM_CONVERSION = YES; 392 | CLANG_WARN_INFINITE_RECURSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 395 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 396 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 397 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 398 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 399 | CLANG_WARN_STRICT_PROTOTYPES = YES; 400 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 401 | CLANG_WARN_UNREACHABLE_CODE = YES; 402 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 403 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 404 | COPY_PHASE_STRIP = NO; 405 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 406 | ENABLE_NS_ASSERTIONS = NO; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | GCC_C_LANGUAGE_STANDARD = gnu99; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 417 | MTL_ENABLE_DEBUG_INFO = NO; 418 | SDKROOT = iphoneos; 419 | TARGETED_DEVICE_FAMILY = "1,2"; 420 | VALIDATE_PRODUCT = YES; 421 | }; 422 | name = Release; 423 | }; 424 | 93BDA8681AAB736600BAED02 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 428 | INFOPLIST_FILE = PagedArrayExample/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 430 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | SWIFT_VERSION = 5.0; 433 | }; 434 | name = Debug; 435 | }; 436 | 93BDA8691AAB736600BAED02 /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 440 | INFOPLIST_FILE = PagedArrayExample/Info.plist; 441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 442 | PRODUCT_BUNDLE_IDENTIFIER = "com.appsandwonders.$(PRODUCT_NAME:rfc1034identifier)"; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 445 | SWIFT_VERSION = 5.0; 446 | }; 447 | name = Release; 448 | }; 449 | /* End XCBuildConfiguration section */ 450 | 451 | /* Begin XCConfigurationList section */ 452 | 93BDA8431AAB736600BAED02 /* Build configuration list for PBXProject "PagedArrayExample" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 93BDA8651AAB736600BAED02 /* Debug */, 456 | 93BDA8661AAB736600BAED02 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | defaultConfigurationName = Release; 460 | }; 461 | 93BDA8671AAB736600BAED02 /* Build configuration list for PBXNativeTarget "PagedArrayExample" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 93BDA8681AAB736600BAED02 /* Debug */, 465 | 93BDA8691AAB736600BAED02 /* Release */, 466 | ); 467 | defaultConfigurationIsVisible = 0; 468 | defaultConfigurationName = Release; 469 | }; 470 | /* End XCConfigurationList section */ 471 | }; 472 | rootObject = 93BDA8401AAB736600BAED02 /* Project object */; 473 | } 474 | -------------------------------------------------------------------------------- /PagedArrayExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PagedArrayExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // 4 | // Created by Alek Åström on 2015-02-14. 5 | // Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | 27 | @UIApplicationMain 28 | class AppDelegate: UIResponder, UIApplicationDelegate { 29 | var window: UIWindow? 30 | } 31 | 32 | -------------------------------------------------------------------------------- /PagedArrayExample/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /PagedArrayExample/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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /PagedArrayExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /PagedArrayExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /PagedArrayExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // 4 | // Created by Alek Åström on 2015-02-14. 5 | // Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | import PagedArray 27 | 28 | // Tweak these values and see how the user experience is affected 29 | let PreloadMargin = 10 /// How many rows "in front" should be loaded 30 | let PageSize = 25 /// Paging size 31 | let DataLoadingOperationDuration = 0.5 /// Simulated network operation duration 32 | let TotalCount = 200 /// Number of rows in table view 33 | 34 | 35 | class ViewController: UITableViewController { 36 | 37 | let cellIdentifier = "Cell" 38 | let operationQueue = OperationQueue() 39 | 40 | var pagedArray = PagedArray(count: TotalCount, pageSize: PageSize) 41 | var dataLoadingOperations = [Int: Operation]() 42 | var shouldPreload = true 43 | 44 | // MARK: User actions 45 | 46 | @IBAction func clearDataPressed() { 47 | dataLoadingOperations.removeAll(keepingCapacity: true) 48 | operationQueue.cancelAllOperations() 49 | pagedArray.removeAllPages() 50 | tableView.reloadData() 51 | } 52 | 53 | @IBAction func preLoadingSwitchChanged(_ sender: UISwitch) { 54 | shouldPreload = sender.isOn 55 | } 56 | 57 | // MARK: Private functions 58 | 59 | fileprivate func configureCell(_ cell: UITableViewCell, data: String?) { 60 | cell.textLabel!.text = data ?? "" 61 | } 62 | 63 | fileprivate func loadDataIfNeededForRow(_ row: Int) { 64 | 65 | let currentPage = pagedArray.page(for: row) 66 | if needsLoadDataForPage(currentPage) { 67 | loadDataForPage(currentPage) 68 | } 69 | 70 | let preloadIndex = row+PreloadMargin 71 | if preloadIndex < pagedArray.endIndex && shouldPreload { 72 | let preloadPage = pagedArray.page(for: preloadIndex) 73 | if preloadPage > currentPage && needsLoadDataForPage(preloadPage) { 74 | loadDataForPage(preloadPage) 75 | } 76 | } 77 | } 78 | 79 | private func needsLoadDataForPage(_ page: Int) -> Bool { 80 | return pagedArray.elements[page] == nil && dataLoadingOperations[page] == nil 81 | } 82 | 83 | private func loadDataForPage(_ page: Int) { 84 | let indexes = pagedArray.indexes(for: page) 85 | 86 | // Create loading operation 87 | let operation = DataLoadingOperation(indexesToLoad: indexes) { [unowned self] indexes, data in 88 | 89 | // Set elements on paged array 90 | self.pagedArray.set(data, forPage: page) 91 | 92 | // Reload cells 93 | if let indexPathsToReload = self.visibleIndexPathsForIndexes(indexes) { 94 | self.tableView.reloadRows(at: indexPathsToReload, with: .automatic) 95 | } 96 | 97 | // Cleanup 98 | self.dataLoadingOperations[page] = nil 99 | } 100 | 101 | // Add operation to queue and save it 102 | operationQueue.addOperation(operation) 103 | dataLoadingOperations[page] = operation 104 | } 105 | 106 | private func visibleIndexPathsForIndexes(_ indexes: CountableRange) -> [IndexPath]? { 107 | return tableView.indexPathsForVisibleRows?.filter { indexes.contains(($0 as NSIndexPath).row) } 108 | } 109 | 110 | } 111 | 112 | // MARK: Table view datasource 113 | extension ViewController { 114 | 115 | override func numberOfSections(in tableView: UITableView) -> Int { 116 | return 1 117 | } 118 | 119 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 120 | return pagedArray.count 121 | } 122 | 123 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 124 | loadDataIfNeededForRow((indexPath as NSIndexPath).row) 125 | 126 | let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier)! 127 | configureCell(cell, data: pagedArray[indexPath.row]) 128 | return cell 129 | } 130 | 131 | } 132 | 133 | 134 | /// Test operation that produces nonsense numbers as data 135 | class DataLoadingOperation: BlockOperation { 136 | 137 | init(indexesToLoad: CountableRange, completion: @escaping (CountableRange, [String]) -> Void) { 138 | super.init() 139 | 140 | print("Loading indexes: \(indexesToLoad)") 141 | 142 | addExecutionBlock { 143 | // Simulate loading 144 | Thread.sleep(forTimeInterval: DataLoadingOperationDuration) 145 | } 146 | 147 | completionBlock = { 148 | let data = indexesToLoad.map { "Content data \($0)" } 149 | 150 | OperationQueue.main.addOperation { 151 | completion(indexesToLoad, data) 152 | } 153 | } 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PagedArray 2 | [![Version](https://img.shields.io/cocoapods/v/PagedArray.svg?style=flat)](http://cocoadocs.org/docsets/PagedArray) 3 | [![License](https://img.shields.io/cocoapods/l/PagedArray.svg?style=flat)](http://cocoadocs.org/docsets/PagedArray) 4 | [![Platform](https://img.shields.io/cocoapods/p/PagedArray.svg?style=flat)](http://cocoadocs.org/docsets/PagedArray) 5 | 6 | PagedArray is a generic Swift data structure for helping you implement paging mechanisms in (but not limited to) UITableViews, UICollectionViews and UIPageViewControllers. 7 | 8 | It is a Swift-version of its Objective-C equivalent [`AWPagedArray`](https://github.com/MrAlek/AWPagedArray), which was used for implementing the techniques described in the blog post [Fluent Pagination – no more jumpy scrolling](http://www.iosnomad.com/blog/2014/4/21/fluent-pagination). 9 | 10 | PagedArray represents a list of optional elements stored by pages. It implements all the familiar Swift collection protocols so your datasource can use it just like a regular Array while providing an easy-to-use API for setting pages of data as they are retrieved. 11 | 12 | ```swift 13 | 14 | // Initialize 15 | var pagedArray = PagedArray(count: 200, pageSize: 20) 16 | 17 | // Set data pages 18 | pagedArray.set(elements: ["A" ... "T"], forPage: 1) 19 | 20 | // Retrieve data like a normal array containing optional elements 21 | pagedArray.count // 200 22 | pagedArray[0] // "A" 23 | pagedArray[100] // nil 24 | 25 | // Iterate 26 | for element: String? in pagedArray { 27 | // Do magic 28 | } 29 | 30 | // Map, filter reduce 31 | pagedArray.filter{ $0 != nil }.map{ $0! }.reduce("", combine:+) // "ABCDE..." 32 | 33 | // Convert to array 34 | Array(pagedArray) // ["A", "B", ... nil, nil] 35 | 36 | ``` 37 | 38 | ![UITableView example](FluentPagination.gif) 39 | 40 | ## Installation 41 | 42 | **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks.** 43 | 44 | To use PagedArray with a project targeting iOS 7, you must include the `PagedArray.swift` source file directly in your project. 45 | 46 | ### Swift Package Manager 47 | 48 | To integrate PagedArray into your project using SwiftPM add the following to your Package.swift: 49 | 50 | ```swift 51 | dependencies: [ 52 | .package(url: "https://github.com/MrAlek/PagedArray", from: "0.9"), 53 | ], 54 | ``` 55 | 56 | ### Cocoapods 57 | 58 | To integrate PagedArray into your Xcode project using CocoaPods, specify it in your `Podfile`: 59 | 60 | ```ruby 61 | source 'https://github.com/CocoaPods/Specs.git' 62 | platform :ios, '8.0' 63 | 64 | pod 'PagedArray' 65 | ``` 66 | 67 | Then, run the following command: 68 | 69 | ```bash 70 | $ pod install 71 | ``` 72 | 73 | ### Carthage 74 | 75 | Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application. 76 | 77 | You can install Carthage with [Homebrew](http://brew.sh/) using the following command: 78 | 79 | ```bash 80 | $ brew update 81 | $ brew install carthage 82 | ``` 83 | 84 | To integrate PagedArray into your Xcode project using Carthage, specify it in your `Cartfile`: 85 | 86 | ```ogdl 87 | github "MrAlek/PagedArray" 88 | ``` 89 | 90 | ## Demo 91 | 92 | The included example project shows a demo with a tweakable `UITableViewController` displaying a large number of rows using paging data. 93 | 94 | ## Tests 95 | 96 | The data structure is thoroughly tested by included XCUnit tests but no guarantees are given. 97 | 98 | ## License 99 | 100 | PagedArray is available under the MIT license. See the LICENSE file for more info. 101 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Sources/PagedArray.h: -------------------------------------------------------------------------------- 1 | // 2 | // PagedArray.h 3 | // 4 | // Created by Alek Åström on 2015-02-14. 5 | // Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | //! Project version number for PagedArray. 28 | FOUNDATION_EXPORT double PagedArrayVersionNumber; 29 | 30 | //! Project version string for PagedArray. 31 | FOUNDATION_EXPORT const unsigned char PagedArrayVersionString[]; 32 | -------------------------------------------------------------------------------- /Sources/PagedArray.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PagedArray.swift 3 | // 4 | // Created by Alek Åström on 2015-02-14. 5 | // Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | /// 26 | /// A paging collection type for arbitrary elements. Great for implementing paging 27 | /// mechanisms to scrolling UI elements such as `UICollectionView` and `UITableView`. 28 | /// 29 | public struct PagedArray { 30 | public typealias PageIndex = Int 31 | 32 | /// The datastorage 33 | public fileprivate(set) var elements = [PageIndex: [T]]() 34 | 35 | // MARK: Public properties 36 | 37 | /// The size of each page 38 | public let pageSize: Int 39 | 40 | /// The total count of supposed elements, including nil values 41 | public var count: Int 42 | 43 | /// The starting page index 44 | public let startPage: PageIndex 45 | 46 | /// When set to true, no size or upper index checking 47 | /// is done when setting pages, making the paged array 48 | /// adjust its size dynamically. 49 | /// 50 | /// Useful for infinite lists and when data count cannot 51 | /// be guaranteed not to change while loading new pages. 52 | public var updatesCountWhenSettingPages: Bool = false 53 | 54 | /// The last valid page index 55 | public var lastPage: PageIndex { 56 | if count == 0 { 57 | return 0 58 | } else if count%pageSize == 0 { 59 | return count/pageSize+startPage-1 60 | } else { 61 | return count/pageSize+startPage 62 | } 63 | } 64 | 65 | /// All elements currently set, in order 66 | public var loadedElements: [T] { 67 | return self.compactMap { $0 } 68 | } 69 | 70 | // MARK: Initializers 71 | 72 | /// Creates an empty `PagedArray` 73 | public init(count: Int, pageSize: Int, startPage: PageIndex = 0) { 74 | self.count = count 75 | self.pageSize = pageSize 76 | self.startPage = startPage 77 | } 78 | 79 | // MARK: Public functions 80 | 81 | /// Returns the page index for an element index 82 | public func page(for index: Index) -> PageIndex { 83 | assert(index >= startIndex && index < endIndex, "Index out of bounds") 84 | return index/pageSize+startPage 85 | } 86 | 87 | /// Returns a `Range` corresponding to the indexes for a page 88 | public func indexes(for page: PageIndex) -> CountableRange { 89 | assert(page >= startPage && page <= lastPage, "Page index out of bounds") 90 | 91 | let start: Index = (page-startPage)*pageSize 92 | let end: Index 93 | if page == lastPage { 94 | end = count 95 | } else { 96 | end = start+pageSize 97 | } 98 | 99 | return (start..= startPage, "Page index out of bounds") 107 | assert(count == 0 || elements.count > 0, "Can't set empty elements page on non-empty array") 108 | 109 | let pageIndexForExpectedSize = (page > lastPage) ? lastPage : page 110 | let expectedSize = size(for: pageIndexForExpectedSize) 111 | 112 | if !updatesCountWhenSettingPages { 113 | assert(page <= lastPage, "Page index out of bounds") 114 | assert(elements.count == expectedSize, "Incorrect page size") 115 | } else { 116 | // High Chaparall mode, array can change in size 117 | count += elements.count-expectedSize 118 | if page > lastPage { 119 | count += (page-lastPage)*pageSize 120 | } 121 | } 122 | 123 | self.elements[page] = elements 124 | } 125 | 126 | /// Removes the elements corresponding to the page, replacing them with `nil` values 127 | public mutating func remove(_ page: PageIndex) { 128 | elements[page] = nil 129 | } 130 | 131 | /// Removes all loaded elements, replacing them with `nil` values 132 | public mutating func removeAllPages() { 133 | elements.removeAll(keepingCapacity: true) 134 | } 135 | 136 | } 137 | 138 | // MARK: SequenceType 139 | 140 | extension PagedArray : Sequence { 141 | public func makeIterator() -> IndexingIterator { 142 | return IndexingIterator(_elements: self) 143 | } 144 | } 145 | 146 | // MARK: CollectionType 147 | 148 | extension PagedArray : BidirectionalCollection { 149 | public typealias Index = Int 150 | 151 | public var startIndex: Index { return 0 } 152 | public var endIndex: Index { return count } 153 | 154 | public func index(after i: Index) -> Index { 155 | return i+1 156 | } 157 | 158 | public func index(before i: Index) -> Index { 159 | return i-1 160 | } 161 | 162 | /// Accesses and sets elements for a given flat index position. 163 | /// Currently, setter can only be used to replace non-optional values. 164 | public subscript (position: Index) -> T? { 165 | get { 166 | let pageIndex = page(for: position) 167 | 168 | if let page = elements[pageIndex] { 169 | return page[position%pageSize] 170 | } else { 171 | // Return nil for all pages that haven't been set yet 172 | return nil 173 | } 174 | } 175 | 176 | set(newValue) { 177 | guard let newValue = newValue else { return } 178 | 179 | let pageIndex = page(for: position) 180 | var elementPage = elements[pageIndex] 181 | elementPage?[position % pageSize] = newValue 182 | elements[pageIndex] = elementPage 183 | } 184 | } 185 | } 186 | 187 | // MARK: Printable 188 | 189 | extension PagedArray : CustomStringConvertible { 190 | public var description: String { 191 | return "PagedArray(\(Array(self)))" 192 | } 193 | } 194 | 195 | // MARK: DebugPrintable 196 | 197 | extension PagedArray : CustomDebugStringConvertible { 198 | public var debugDescription: String { 199 | return "PagedArray(Pages: \(elements), Array representation: \(Array(self)))" 200 | } 201 | } 202 | 203 | // MARK: Private functions 204 | 205 | private extension PagedArray { 206 | func size(for page: PageIndex) -> Int { 207 | let indexes = self.indexes(for: page) 208 | return indexes.endIndex-indexes.startIndex 209 | } 210 | } 211 | 212 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/PagedArrayTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PagedArrayTests.swift 3 | // 4 | // Created by Alek Åström on 2015-02-14. 5 | // Copyright (c) 2015 Alek Åström. (https://github.com/MrAlek) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import XCTest 26 | import PagedArray 27 | 28 | class PagedArrayTests: XCTestCase { 29 | 30 | // These three parameters should be modifiable without any 31 | // test failing as long as the resulting array has at least three pages. 32 | let ArrayCount = 100 33 | let PageSize = 10 34 | let StartPageIndex = 10 35 | 36 | var pagedArray: PagedArray! 37 | 38 | var firstPage: [Int]! 39 | var secondPage: [Int]! 40 | 41 | override func setUp() { 42 | super.setUp() 43 | 44 | pagedArray = PagedArray(count: ArrayCount/2, pageSize: PageSize, startPage: StartPageIndex) 45 | 46 | // Fill up two pages 47 | firstPage = Array(1...PageSize) 48 | secondPage = Array(PageSize+1...PageSize*2) 49 | 50 | pagedArray.set(firstPage, forPage: StartPageIndex) 51 | pagedArray.set(secondPage, forPage: StartPageIndex+1) 52 | 53 | pagedArray.count = ArrayCount 54 | } 55 | 56 | 57 | // MARK: Tests 58 | 59 | func testSizeIsCorrect() { 60 | XCTAssertEqual(pagedArray.count, ArrayCount, "Paged array has wrong size") 61 | XCTAssertEqual(Array(pagedArray).count, ArrayCount, "Paged array elements has wrong size") 62 | } 63 | 64 | func testGeneratorWorks() { 65 | let generatedArray = Array(pagedArray.makeIterator()) 66 | 67 | XCTAssertEqual(generatedArray.count, ArrayCount, "Generated array has wrong count") 68 | XCTAssertEqual(generatedArray[0], firstPage[0], "Generated array has wrong content") 69 | } 70 | 71 | func testSubscriptingWorksForAllValidIndexesWithoutHittingAssertions() { 72 | for i in pagedArray.startIndex.. = PagedArray(count: 0, pageSize: 10) 150 | emptyArray.set(Array(), forPage: 0) 151 | } 152 | 153 | 154 | // MARK: High Chaparall Mode tests 155 | 156 | func testAddingExtraElementInLastPageUpdatesCountInHighChaparallMode() { 157 | 158 | pagedArray.updatesCountWhenSettingPages = true // YEE-HAW 159 | 160 | let lastPageSize = pagedArray.size(for: pagedArray.lastPage)+1 // Simulate finding an extra element from the API 161 | let lastPage = Array(1...lastPageSize) 162 | 163 | pagedArray.set(lastPage, forPage: pagedArray.lastPage) 164 | 165 | XCTAssertEqual(pagedArray.count, ArrayCount+1, "Count did not increase when setting a bigger page than expected") 166 | } 167 | 168 | func testCountIsChangedByAddingExtraPageInHighChaparallMode() { 169 | 170 | pagedArray.updatesCountWhenSettingPages = true // YEE-HAW 171 | 172 | let extraPage = Array(1...PageSize) 173 | 174 | pagedArray.set(extraPage, forPage: pagedArray.lastPage+2) 175 | 176 | var expectedSize = ArrayCount+PageSize*2 177 | if ArrayCount%PageSize > 0 { 178 | expectedSize += PageSize-ArrayCount%PageSize 179 | } 180 | 181 | 182 | XCTAssertEqual(pagedArray.count, expectedSize, "Count did not update when adding extra pages") 183 | } 184 | 185 | func testSettingPageWithLowerSizeUpdatesCountInHighChaparallMode() { 186 | 187 | pagedArray.updatesCountWhenSettingPages = true // YEE-HAW 188 | 189 | pagedArray.set([0], forPage: StartPageIndex) 190 | XCTAssertEqual(pagedArray.count, ArrayCount-PageSize+1, "Count did not update when setting a page with lower length than expected") 191 | } 192 | 193 | // MARK: Utility 194 | fileprivate func calculatedLastPageIndex() -> Int { 195 | if ArrayCount%PageSize == 0 { 196 | return ArrayCount/PageSize+StartPageIndex-1 197 | } else { 198 | return ArrayCount/PageSize+StartPageIndex 199 | } 200 | } 201 | 202 | } 203 | 204 | private extension PagedArray { 205 | func size(for page: PageIndex) -> Int { 206 | let indexes = self.indexes(for: page) 207 | return indexes.endIndex-indexes.startIndex 208 | } 209 | } 210 | 211 | --------------------------------------------------------------------------------