├── InfiniteScrollView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── aybekcankaya.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── aybekcankaya.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── InfiniteScrollView ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── BannerView │ └── BannerView.swift ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── InfiniteScrollView.xcdatamodeld │ ├── .xccurrentversion │ └── InfiniteScrollView.xcdatamodel │ │ └── contents ├── Info.plist └── ViewController.swift ├── InfiniteScrollViewTests ├── InfiniteScrollViewTests.swift └── Info.plist └── InfiniteScrollViewUITests ├── InfiniteScrollViewUITests.swift └── Info.plist /InfiniteScrollView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A374F8EA228EAE6800878982 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A374F8E9228EAE6800878982 /* AppDelegate.swift */; }; 11 | A374F8EC228EAE6800878982 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A374F8EB228EAE6800878982 /* ViewController.swift */; }; 12 | A374F8EF228EAE6800878982 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A374F8ED228EAE6800878982 /* Main.storyboard */; }; 13 | A374F8F2228EAE6800878982 /* InfiniteScrollView.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A374F8F0228EAE6800878982 /* InfiniteScrollView.xcdatamodeld */; }; 14 | A374F8F4228EAE6A00878982 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A374F8F3228EAE6A00878982 /* Assets.xcassets */; }; 15 | A374F8F7228EAE6A00878982 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A374F8F5228EAE6A00878982 /* LaunchScreen.storyboard */; }; 16 | A374F902228EAE6A00878982 /* InfiniteScrollViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A374F901228EAE6A00878982 /* InfiniteScrollViewTests.swift */; }; 17 | A374F90D228EAE6A00878982 /* InfiniteScrollViewUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A374F90C228EAE6A00878982 /* InfiniteScrollViewUITests.swift */; }; 18 | A374F920228EB41000878982 /* BannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A374F91F228EB41000878982 /* BannerView.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | A374F8FE228EAE6A00878982 /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = A374F8DE228EAE6800878982 /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = A374F8E5228EAE6800878982; 27 | remoteInfo = InfiniteScrollView; 28 | }; 29 | A374F909228EAE6A00878982 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = A374F8DE228EAE6800878982 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = A374F8E5228EAE6800878982; 34 | remoteInfo = InfiniteScrollView; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | A374F8E6228EAE6800878982 /* InfiniteScrollView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InfiniteScrollView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | A374F8E9228EAE6800878982 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 41 | A374F8EB228EAE6800878982 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 42 | A374F8EE228EAE6800878982 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 43 | A374F8F1228EAE6800878982 /* InfiniteScrollView.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = InfiniteScrollView.xcdatamodel; sourceTree = ""; }; 44 | A374F8F3228EAE6A00878982 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | A374F8F6228EAE6A00878982 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | A374F8F8228EAE6A00878982 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | A374F8FD228EAE6A00878982 /* InfiniteScrollViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InfiniteScrollViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | A374F901228EAE6A00878982 /* InfiniteScrollViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniteScrollViewTests.swift; sourceTree = ""; }; 49 | A374F903228EAE6A00878982 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | A374F908228EAE6A00878982 /* InfiniteScrollViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InfiniteScrollViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | A374F90C228EAE6A00878982 /* InfiniteScrollViewUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfiniteScrollViewUITests.swift; sourceTree = ""; }; 52 | A374F90E228EAE6A00878982 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | A374F91F228EB41000878982 /* BannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BannerView.swift; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | A374F8E3228EAE6800878982 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | A374F8FA228EAE6A00878982 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | A374F905228EAE6A00878982 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | /* End PBXFrameworksBuildPhase section */ 79 | 80 | /* Begin PBXGroup section */ 81 | A374F8DD228EAE6800878982 = { 82 | isa = PBXGroup; 83 | children = ( 84 | A374F8E8228EAE6800878982 /* InfiniteScrollView */, 85 | A374F900228EAE6A00878982 /* InfiniteScrollViewTests */, 86 | A374F90B228EAE6A00878982 /* InfiniteScrollViewUITests */, 87 | A374F8E7228EAE6800878982 /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | A374F8E7228EAE6800878982 /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | A374F8E6228EAE6800878982 /* InfiniteScrollView.app */, 95 | A374F8FD228EAE6A00878982 /* InfiniteScrollViewTests.xctest */, 96 | A374F908228EAE6A00878982 /* InfiniteScrollViewUITests.xctest */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | A374F8E8228EAE6800878982 /* InfiniteScrollView */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | A374F91E228EB40000878982 /* BannerView */, 105 | A374F8E9228EAE6800878982 /* AppDelegate.swift */, 106 | A374F8EB228EAE6800878982 /* ViewController.swift */, 107 | A374F8ED228EAE6800878982 /* Main.storyboard */, 108 | A374F8F3228EAE6A00878982 /* Assets.xcassets */, 109 | A374F8F5228EAE6A00878982 /* LaunchScreen.storyboard */, 110 | A374F8F8228EAE6A00878982 /* Info.plist */, 111 | A374F8F0228EAE6800878982 /* InfiniteScrollView.xcdatamodeld */, 112 | ); 113 | path = InfiniteScrollView; 114 | sourceTree = ""; 115 | }; 116 | A374F900228EAE6A00878982 /* InfiniteScrollViewTests */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | A374F901228EAE6A00878982 /* InfiniteScrollViewTests.swift */, 120 | A374F903228EAE6A00878982 /* Info.plist */, 121 | ); 122 | path = InfiniteScrollViewTests; 123 | sourceTree = ""; 124 | }; 125 | A374F90B228EAE6A00878982 /* InfiniteScrollViewUITests */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | A374F90C228EAE6A00878982 /* InfiniteScrollViewUITests.swift */, 129 | A374F90E228EAE6A00878982 /* Info.plist */, 130 | ); 131 | path = InfiniteScrollViewUITests; 132 | sourceTree = ""; 133 | }; 134 | A374F91E228EB40000878982 /* BannerView */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | A374F91F228EB41000878982 /* BannerView.swift */, 138 | ); 139 | path = BannerView; 140 | sourceTree = ""; 141 | }; 142 | /* End PBXGroup section */ 143 | 144 | /* Begin PBXNativeTarget section */ 145 | A374F8E5228EAE6800878982 /* InfiniteScrollView */ = { 146 | isa = PBXNativeTarget; 147 | buildConfigurationList = A374F911228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollView" */; 148 | buildPhases = ( 149 | A374F8E2228EAE6800878982 /* Sources */, 150 | A374F8E3228EAE6800878982 /* Frameworks */, 151 | A374F8E4228EAE6800878982 /* Resources */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = InfiniteScrollView; 158 | productName = InfiniteScrollView; 159 | productReference = A374F8E6228EAE6800878982 /* InfiniteScrollView.app */; 160 | productType = "com.apple.product-type.application"; 161 | }; 162 | A374F8FC228EAE6A00878982 /* InfiniteScrollViewTests */ = { 163 | isa = PBXNativeTarget; 164 | buildConfigurationList = A374F914228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollViewTests" */; 165 | buildPhases = ( 166 | A374F8F9228EAE6A00878982 /* Sources */, 167 | A374F8FA228EAE6A00878982 /* Frameworks */, 168 | A374F8FB228EAE6A00878982 /* Resources */, 169 | ); 170 | buildRules = ( 171 | ); 172 | dependencies = ( 173 | A374F8FF228EAE6A00878982 /* PBXTargetDependency */, 174 | ); 175 | name = InfiniteScrollViewTests; 176 | productName = InfiniteScrollViewTests; 177 | productReference = A374F8FD228EAE6A00878982 /* InfiniteScrollViewTests.xctest */; 178 | productType = "com.apple.product-type.bundle.unit-test"; 179 | }; 180 | A374F907228EAE6A00878982 /* InfiniteScrollViewUITests */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = A374F917228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollViewUITests" */; 183 | buildPhases = ( 184 | A374F904228EAE6A00878982 /* Sources */, 185 | A374F905228EAE6A00878982 /* Frameworks */, 186 | A374F906228EAE6A00878982 /* Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | A374F90A228EAE6A00878982 /* PBXTargetDependency */, 192 | ); 193 | name = InfiniteScrollViewUITests; 194 | productName = InfiniteScrollViewUITests; 195 | productReference = A374F908228EAE6A00878982 /* InfiniteScrollViewUITests.xctest */; 196 | productType = "com.apple.product-type.bundle.ui-testing"; 197 | }; 198 | /* End PBXNativeTarget section */ 199 | 200 | /* Begin PBXProject section */ 201 | A374F8DE228EAE6800878982 /* Project object */ = { 202 | isa = PBXProject; 203 | attributes = { 204 | LastSwiftUpdateCheck = 1020; 205 | LastUpgradeCheck = 1020; 206 | ORGANIZATIONNAME = "aybek can kaya"; 207 | TargetAttributes = { 208 | A374F8E5228EAE6800878982 = { 209 | CreatedOnToolsVersion = 10.2.1; 210 | }; 211 | A374F8FC228EAE6A00878982 = { 212 | CreatedOnToolsVersion = 10.2.1; 213 | TestTargetID = A374F8E5228EAE6800878982; 214 | }; 215 | A374F907228EAE6A00878982 = { 216 | CreatedOnToolsVersion = 10.2.1; 217 | TestTargetID = A374F8E5228EAE6800878982; 218 | }; 219 | }; 220 | }; 221 | buildConfigurationList = A374F8E1228EAE6800878982 /* Build configuration list for PBXProject "InfiniteScrollView" */; 222 | compatibilityVersion = "Xcode 9.3"; 223 | developmentRegion = en; 224 | hasScannedForEncodings = 0; 225 | knownRegions = ( 226 | en, 227 | Base, 228 | ); 229 | mainGroup = A374F8DD228EAE6800878982; 230 | productRefGroup = A374F8E7228EAE6800878982 /* Products */; 231 | projectDirPath = ""; 232 | projectRoot = ""; 233 | targets = ( 234 | A374F8E5228EAE6800878982 /* InfiniteScrollView */, 235 | A374F8FC228EAE6A00878982 /* InfiniteScrollViewTests */, 236 | A374F907228EAE6A00878982 /* InfiniteScrollViewUITests */, 237 | ); 238 | }; 239 | /* End PBXProject section */ 240 | 241 | /* Begin PBXResourcesBuildPhase section */ 242 | A374F8E4228EAE6800878982 /* Resources */ = { 243 | isa = PBXResourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | A374F8F7228EAE6A00878982 /* LaunchScreen.storyboard in Resources */, 247 | A374F8F4228EAE6A00878982 /* Assets.xcassets in Resources */, 248 | A374F8EF228EAE6800878982 /* Main.storyboard in Resources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | A374F8FB228EAE6A00878982 /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | A374F906228EAE6A00878982 /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | /* End PBXResourcesBuildPhase section */ 267 | 268 | /* Begin PBXSourcesBuildPhase section */ 269 | A374F8E2228EAE6800878982 /* Sources */ = { 270 | isa = PBXSourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | A374F920228EB41000878982 /* BannerView.swift in Sources */, 274 | A374F8EC228EAE6800878982 /* ViewController.swift in Sources */, 275 | A374F8F2228EAE6800878982 /* InfiniteScrollView.xcdatamodeld in Sources */, 276 | A374F8EA228EAE6800878982 /* AppDelegate.swift in Sources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | A374F8F9228EAE6A00878982 /* Sources */ = { 281 | isa = PBXSourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | A374F902228EAE6A00878982 /* InfiniteScrollViewTests.swift in Sources */, 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | }; 288 | A374F904228EAE6A00878982 /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | A374F90D228EAE6A00878982 /* InfiniteScrollViewUITests.swift in Sources */, 293 | ); 294 | runOnlyForDeploymentPostprocessing = 0; 295 | }; 296 | /* End PBXSourcesBuildPhase section */ 297 | 298 | /* Begin PBXTargetDependency section */ 299 | A374F8FF228EAE6A00878982 /* PBXTargetDependency */ = { 300 | isa = PBXTargetDependency; 301 | target = A374F8E5228EAE6800878982 /* InfiniteScrollView */; 302 | targetProxy = A374F8FE228EAE6A00878982 /* PBXContainerItemProxy */; 303 | }; 304 | A374F90A228EAE6A00878982 /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | target = A374F8E5228EAE6800878982 /* InfiniteScrollView */; 307 | targetProxy = A374F909228EAE6A00878982 /* PBXContainerItemProxy */; 308 | }; 309 | /* End PBXTargetDependency section */ 310 | 311 | /* Begin PBXVariantGroup section */ 312 | A374F8ED228EAE6800878982 /* Main.storyboard */ = { 313 | isa = PBXVariantGroup; 314 | children = ( 315 | A374F8EE228EAE6800878982 /* Base */, 316 | ); 317 | name = Main.storyboard; 318 | sourceTree = ""; 319 | }; 320 | A374F8F5228EAE6A00878982 /* LaunchScreen.storyboard */ = { 321 | isa = PBXVariantGroup; 322 | children = ( 323 | A374F8F6228EAE6A00878982 /* Base */, 324 | ); 325 | name = LaunchScreen.storyboard; 326 | sourceTree = ""; 327 | }; 328 | /* End PBXVariantGroup section */ 329 | 330 | /* Begin XCBuildConfiguration section */ 331 | A374F90F228EAE6A00878982 /* Debug */ = { 332 | isa = XCBuildConfiguration; 333 | buildSettings = { 334 | ALWAYS_SEARCH_USER_PATHS = NO; 335 | CLANG_ANALYZER_NONNULL = YES; 336 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_ENABLE_OBJC_WEAK = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 349 | CLANG_WARN_EMPTY_BODY = YES; 350 | CLANG_WARN_ENUM_CONVERSION = YES; 351 | CLANG_WARN_INFINITE_RECURSION = YES; 352 | CLANG_WARN_INT_CONVERSION = YES; 353 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 354 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 355 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 358 | CLANG_WARN_STRICT_PROTOTYPES = YES; 359 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 360 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | CODE_SIGN_IDENTITY = "iPhone Developer"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | ENABLE_TESTABILITY = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu11; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 383 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 384 | MTL_FAST_MATH = YES; 385 | ONLY_ACTIVE_ARCH = YES; 386 | SDKROOT = iphoneos; 387 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 388 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 389 | }; 390 | name = Debug; 391 | }; 392 | A374F910228EAE6A00878982 /* Release */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ALWAYS_SEARCH_USER_PATHS = NO; 396 | CLANG_ANALYZER_NONNULL = YES; 397 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 398 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 399 | CLANG_CXX_LIBRARY = "libc++"; 400 | CLANG_ENABLE_MODULES = YES; 401 | CLANG_ENABLE_OBJC_ARC = YES; 402 | CLANG_ENABLE_OBJC_WEAK = YES; 403 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 404 | CLANG_WARN_BOOL_CONVERSION = YES; 405 | CLANG_WARN_COMMA = YES; 406 | CLANG_WARN_CONSTANT_CONVERSION = YES; 407 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 408 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 409 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INFINITE_RECURSION = YES; 413 | CLANG_WARN_INT_CONVERSION = YES; 414 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 415 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 416 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 417 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 418 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 419 | CLANG_WARN_STRICT_PROTOTYPES = YES; 420 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 421 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 422 | CLANG_WARN_UNREACHABLE_CODE = YES; 423 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 424 | CODE_SIGN_IDENTITY = "iPhone Developer"; 425 | COPY_PHASE_STRIP = NO; 426 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 427 | ENABLE_NS_ASSERTIONS = NO; 428 | ENABLE_STRICT_OBJC_MSGSEND = YES; 429 | GCC_C_LANGUAGE_STANDARD = gnu11; 430 | GCC_NO_COMMON_BLOCKS = YES; 431 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 432 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 433 | GCC_WARN_UNDECLARED_SELECTOR = YES; 434 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 435 | GCC_WARN_UNUSED_FUNCTION = YES; 436 | GCC_WARN_UNUSED_VARIABLE = YES; 437 | IPHONEOS_DEPLOYMENT_TARGET = 12.2; 438 | MTL_ENABLE_DEBUG_INFO = NO; 439 | MTL_FAST_MATH = YES; 440 | SDKROOT = iphoneos; 441 | SWIFT_COMPILATION_MODE = wholemodule; 442 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 443 | VALIDATE_PRODUCT = YES; 444 | }; 445 | name = Release; 446 | }; 447 | A374F912228EAE6A00878982 /* Debug */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 451 | CODE_SIGN_STYLE = Automatic; 452 | DEVELOPMENT_TEAM = KB47GLBFWQ; 453 | INFOPLIST_FILE = InfiniteScrollView/Info.plist; 454 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 455 | LD_RUNPATH_SEARCH_PATHS = ( 456 | "$(inherited)", 457 | "@executable_path/Frameworks", 458 | ); 459 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollView; 460 | PRODUCT_NAME = "$(TARGET_NAME)"; 461 | SWIFT_VERSION = 5.0; 462 | TARGETED_DEVICE_FAMILY = "1,2"; 463 | }; 464 | name = Debug; 465 | }; 466 | A374F913228EAE6A00878982 /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 470 | CODE_SIGN_STYLE = Automatic; 471 | DEVELOPMENT_TEAM = KB47GLBFWQ; 472 | INFOPLIST_FILE = InfiniteScrollView/Info.plist; 473 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 474 | LD_RUNPATH_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "@executable_path/Frameworks", 477 | ); 478 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollView; 479 | PRODUCT_NAME = "$(TARGET_NAME)"; 480 | SWIFT_VERSION = 5.0; 481 | TARGETED_DEVICE_FAMILY = "1,2"; 482 | }; 483 | name = Release; 484 | }; 485 | A374F915228EAE6A00878982 /* Debug */ = { 486 | isa = XCBuildConfiguration; 487 | buildSettings = { 488 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 489 | BUNDLE_LOADER = "$(TEST_HOST)"; 490 | CODE_SIGN_STYLE = Automatic; 491 | DEVELOPMENT_TEAM = KB47GLBFWQ; 492 | INFOPLIST_FILE = InfiniteScrollViewTests/Info.plist; 493 | LD_RUNPATH_SEARCH_PATHS = ( 494 | "$(inherited)", 495 | "@executable_path/Frameworks", 496 | "@loader_path/Frameworks", 497 | ); 498 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollViewTests; 499 | PRODUCT_NAME = "$(TARGET_NAME)"; 500 | SWIFT_VERSION = 5.0; 501 | TARGETED_DEVICE_FAMILY = "1,2"; 502 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniteScrollView.app/InfiniteScrollView"; 503 | }; 504 | name = Debug; 505 | }; 506 | A374F916228EAE6A00878982 /* Release */ = { 507 | isa = XCBuildConfiguration; 508 | buildSettings = { 509 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 510 | BUNDLE_LOADER = "$(TEST_HOST)"; 511 | CODE_SIGN_STYLE = Automatic; 512 | DEVELOPMENT_TEAM = KB47GLBFWQ; 513 | INFOPLIST_FILE = InfiniteScrollViewTests/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = ( 515 | "$(inherited)", 516 | "@executable_path/Frameworks", 517 | "@loader_path/Frameworks", 518 | ); 519 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollViewTests; 520 | PRODUCT_NAME = "$(TARGET_NAME)"; 521 | SWIFT_VERSION = 5.0; 522 | TARGETED_DEVICE_FAMILY = "1,2"; 523 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/InfiniteScrollView.app/InfiniteScrollView"; 524 | }; 525 | name = Release; 526 | }; 527 | A374F918228EAE6A00878982 /* Debug */ = { 528 | isa = XCBuildConfiguration; 529 | buildSettings = { 530 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 531 | CODE_SIGN_STYLE = Automatic; 532 | DEVELOPMENT_TEAM = KB47GLBFWQ; 533 | INFOPLIST_FILE = InfiniteScrollViewUITests/Info.plist; 534 | LD_RUNPATH_SEARCH_PATHS = ( 535 | "$(inherited)", 536 | "@executable_path/Frameworks", 537 | "@loader_path/Frameworks", 538 | ); 539 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollViewUITests; 540 | PRODUCT_NAME = "$(TARGET_NAME)"; 541 | SWIFT_VERSION = 5.0; 542 | TARGETED_DEVICE_FAMILY = "1,2"; 543 | TEST_TARGET_NAME = InfiniteScrollView; 544 | }; 545 | name = Debug; 546 | }; 547 | A374F919228EAE6A00878982 /* Release */ = { 548 | isa = XCBuildConfiguration; 549 | buildSettings = { 550 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 551 | CODE_SIGN_STYLE = Automatic; 552 | DEVELOPMENT_TEAM = KB47GLBFWQ; 553 | INFOPLIST_FILE = InfiniteScrollViewUITests/Info.plist; 554 | LD_RUNPATH_SEARCH_PATHS = ( 555 | "$(inherited)", 556 | "@executable_path/Frameworks", 557 | "@loader_path/Frameworks", 558 | ); 559 | PRODUCT_BUNDLE_IDENTIFIER = ack.WeekCal.InfiniteScrollViewUITests; 560 | PRODUCT_NAME = "$(TARGET_NAME)"; 561 | SWIFT_VERSION = 5.0; 562 | TARGETED_DEVICE_FAMILY = "1,2"; 563 | TEST_TARGET_NAME = InfiniteScrollView; 564 | }; 565 | name = Release; 566 | }; 567 | /* End XCBuildConfiguration section */ 568 | 569 | /* Begin XCConfigurationList section */ 570 | A374F8E1228EAE6800878982 /* Build configuration list for PBXProject "InfiniteScrollView" */ = { 571 | isa = XCConfigurationList; 572 | buildConfigurations = ( 573 | A374F90F228EAE6A00878982 /* Debug */, 574 | A374F910228EAE6A00878982 /* Release */, 575 | ); 576 | defaultConfigurationIsVisible = 0; 577 | defaultConfigurationName = Release; 578 | }; 579 | A374F911228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollView" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | A374F912228EAE6A00878982 /* Debug */, 583 | A374F913228EAE6A00878982 /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | A374F914228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollViewTests" */ = { 589 | isa = XCConfigurationList; 590 | buildConfigurations = ( 591 | A374F915228EAE6A00878982 /* Debug */, 592 | A374F916228EAE6A00878982 /* Release */, 593 | ); 594 | defaultConfigurationIsVisible = 0; 595 | defaultConfigurationName = Release; 596 | }; 597 | A374F917228EAE6A00878982 /* Build configuration list for PBXNativeTarget "InfiniteScrollViewUITests" */ = { 598 | isa = XCConfigurationList; 599 | buildConfigurations = ( 600 | A374F918228EAE6A00878982 /* Debug */, 601 | A374F919228EAE6A00878982 /* Release */, 602 | ); 603 | defaultConfigurationIsVisible = 0; 604 | defaultConfigurationName = Release; 605 | }; 606 | /* End XCConfigurationList section */ 607 | 608 | /* Begin XCVersionGroup section */ 609 | A374F8F0228EAE6800878982 /* InfiniteScrollView.xcdatamodeld */ = { 610 | isa = XCVersionGroup; 611 | children = ( 612 | A374F8F1228EAE6800878982 /* InfiniteScrollView.xcdatamodel */, 613 | ); 614 | currentVersion = A374F8F1228EAE6800878982 /* InfiniteScrollView.xcdatamodel */; 615 | path = InfiniteScrollView.xcdatamodeld; 616 | sourceTree = ""; 617 | versionGroupType = wrapper.xcdatamodel; 618 | }; 619 | /* End XCVersionGroup section */ 620 | }; 621 | rootObject = A374F8DE228EAE6800878982 /* Project object */; 622 | } 623 | -------------------------------------------------------------------------------- /InfiniteScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /InfiniteScrollView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /InfiniteScrollView.xcodeproj/project.xcworkspace/xcuserdata/aybekcankaya.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aybekckaya/InfiniteScrollView/85b8d00ea24255fbbbc8666d019e4dd3b1c97af8/InfiniteScrollView.xcodeproj/project.xcworkspace/xcuserdata/aybekcankaya.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /InfiniteScrollView.xcodeproj/xcuserdata/aybekcankaya.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /InfiniteScrollView.xcodeproj/xcuserdata/aybekcankaya.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | InfiniteScrollView.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /InfiniteScrollView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // InfiniteScrollView 4 | // 5 | // Created by aybek can kaya on 17.05.2019. 6 | // Copyright © 2019 aybek can kaya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreData 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | 18 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 19 | // Override point for customization after application launch. 20 | return true 21 | } 22 | 23 | func applicationWillResignActive(_ application: UIApplication) { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 26 | } 27 | 28 | func applicationDidEnterBackground(_ application: UIApplication) { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | func applicationWillEnterForeground(_ application: UIApplication) { 34 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | func applicationDidBecomeActive(_ application: UIApplication) { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | func applicationWillTerminate(_ application: UIApplication) { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | // Saves changes in the application's managed object context before the application terminates. 44 | self.saveContext() 45 | } 46 | 47 | // MARK: - Core Data stack 48 | 49 | lazy var persistentContainer: NSPersistentContainer = { 50 | /* 51 | The persistent container for the application. This implementation 52 | creates and returns a container, having loaded the store for the 53 | application to it. This property is optional since there are legitimate 54 | error conditions that could cause the creation of the store to fail. 55 | */ 56 | let container = NSPersistentContainer(name: "InfiniteScrollView") 57 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 58 | if let error = error as NSError? { 59 | // Replace this implementation with code to handle the error appropriately. 60 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 61 | 62 | /* 63 | Typical reasons for an error here include: 64 | * The parent directory does not exist, cannot be created, or disallows writing. 65 | * The persistent store is not accessible, due to permissions or data protection when the device is locked. 66 | * The device is out of space. 67 | * The store could not be migrated to the current model version. 68 | Check the error message to determine what the actual problem was. 69 | */ 70 | fatalError("Unresolved error \(error), \(error.userInfo)") 71 | } 72 | }) 73 | return container 74 | }() 75 | 76 | // MARK: - Core Data Saving support 77 | 78 | func saveContext () { 79 | let context = persistentContainer.viewContext 80 | if context.hasChanges { 81 | do { 82 | try context.save() 83 | } catch { 84 | // Replace this implementation with code to handle the error appropriately. 85 | // fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. 86 | let nserror = error as NSError 87 | fatalError("Unresolved error \(nserror), \(nserror.userInfo)") 88 | } 89 | } 90 | } 91 | 92 | } 93 | 94 | -------------------------------------------------------------------------------- /InfiniteScrollView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /InfiniteScrollView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /InfiniteScrollView/BannerView/BannerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BannerView.swift 3 | // InfiniteScrollView 4 | // 5 | // Created by aybek can kaya on 17.05.2019. 6 | // Copyright © 2019 aybek can kaya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct BannerViewConfiguration { 12 | var pagingDuration = 1.0 13 | var enableSelection = true 14 | 15 | } 16 | 17 | 18 | class BannerView: UIView , UIScrollViewDelegate{ 19 | 20 | private let scrollView:UIScrollView = { 21 | let sc = UIScrollView(frame: .zero) 22 | sc.translatesAutoresizingMaskIntoConstraints = false 23 | sc.isPagingEnabled = true 24 | return sc 25 | }() 26 | 27 | private var itemAtIndex:((_ bannerView:BannerView , _ index:Int)->(UIView))! 28 | private var numberOfItems:Int = 0 29 | 30 | override init(frame: CGRect) { 31 | super.init(frame: frame) 32 | setUpUI() 33 | } 34 | 35 | required init?(coder aDecoder: NSCoder) { 36 | fatalError("init(coder:) has not been implemented") 37 | } 38 | 39 | func reloadData(configuration:BannerViewConfiguration? , numberOfItems:Int , itemAtIndex:@escaping ((_ bannerView:BannerView , _ index:Int)->(UIView)) ) { 40 | self.itemAtIndex = itemAtIndex 41 | self.numberOfItems = numberOfItems 42 | reloadScrollView() 43 | } 44 | 45 | private func reloadScrollView() { 46 | guard self.numberOfItems > 0 else { return } 47 | if self.numberOfItems == 1 { 48 | let firstItem:UIView = self.itemAtIndex(self , 0) 49 | addViewToIndex(view: firstItem, index: 0) 50 | scrollView.isScrollEnabled = false 51 | return 52 | } 53 | let firstItem:UIView = self.itemAtIndex(self , 0) 54 | addViewToIndex(view: firstItem, index: numberOfItems+1) 55 | 56 | let lastItem:UIView = self.itemAtIndex(self , numberOfItems-1) 57 | addViewToIndex(view: lastItem, index: 0) 58 | for index in 0.. 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /InfiniteScrollView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /InfiniteScrollView/InfiniteScrollView.xcdatamodeld/.xccurrentversion: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | _XCCurrentVersionName 6 | InfiniteScrollView.xcdatamodel 7 | 8 | 9 | -------------------------------------------------------------------------------- /InfiniteScrollView/InfiniteScrollView.xcdatamodeld/InfiniteScrollView.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /InfiniteScrollView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /InfiniteScrollView/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // InfiniteScrollView 4 | // 5 | // Created by aybek can kaya on 17.05.2019. 6 | // Copyright © 2019 aybek can kaya. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | 12 | 13 | class ViewController: UIViewController { 14 | 15 | private var bannerView:BannerView! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | setUpUI() 20 | setUpBannerView() 21 | } 22 | 23 | private func setUpUI() { 24 | self.view.backgroundColor = #colorLiteral(red: 0.1725490196, green: 0.2431372549, blue: 0.3137254902, alpha: 1) 25 | 26 | bannerView = BannerView(frame: CGRect(x: 0, y: 64, width: self.view.frame.size.width, height: 200)) 27 | self.view.addSubview(bannerView) 28 | 29 | bannerView.backgroundColor = UIColor.green 30 | 31 | } 32 | 33 | private func setUpBannerView() { 34 | 35 | bannerView.reloadData(configuration: nil, numberOfItems: 5) { (bannerView, index) -> (UIView) in 36 | 37 | return self.itemView(at: index) 38 | } 39 | } 40 | 41 | private func itemView(at index:Int)->UIImageView { 42 | let urls:[String] = ["https://images.pexels.com/photos/236047/pexels-photo-236047.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500", 43 | "https://cdn.pixabay.com/photo/2015/12/01/20/28/fall-1072821__340.jpg", 44 | "https://images.pexels.com/photos/257360/pexels-photo-257360.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500", 45 | "https://cdn.pixabay.com/photo/2017/04/09/09/56/avenue-2215317__340.jpg", 46 | "https://images.unsplash.com/photo-1500622944204-b135684e99fd?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80"] 47 | let itemImageView:UIImageView = UIImageView(frame: .zero) 48 | itemImageView.translatesAutoresizingMaskIntoConstraints = false 49 | itemImageView.setImage(path: urls[index]) 50 | itemImageView.clipsToBounds = true 51 | itemImageView.contentMode = UIView.ContentMode.scaleAspectFill 52 | 53 | return itemImageView 54 | } 55 | 56 | 57 | } 58 | 59 | extension UIImageView { 60 | 61 | func setImage(path:String) { 62 | guard let url:URL = URL(string: path) else { return } 63 | DispatchQueue.global(qos: .background).async { 64 | guard let data:Data = try? Data(contentsOf: url) , let image:UIImage = UIImage(data: data) else { return } 65 | DispatchQueue.main.async { 66 | self.image = image 67 | } 68 | } 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /InfiniteScrollViewTests/InfiniteScrollViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfiniteScrollViewTests.swift 3 | // InfiniteScrollViewTests 4 | // 5 | // Created by aybek can kaya on 17.05.2019. 6 | // Copyright © 2019 aybek can kaya. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import InfiniteScrollView 11 | 12 | class InfiniteScrollViewTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /InfiniteScrollViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /InfiniteScrollViewUITests/InfiniteScrollViewUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // InfiniteScrollViewUITests.swift 3 | // InfiniteScrollViewUITests 4 | // 5 | // Created by aybek can kaya on 17.05.2019. 6 | // Copyright © 2019 aybek can kaya. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class InfiniteScrollViewUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 20 | XCUIApplication().launch() 21 | 22 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 23 | } 24 | 25 | override func tearDown() { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | } 28 | 29 | func testExample() { 30 | // Use recording to get started writing UI tests. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /InfiniteScrollViewUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | --------------------------------------------------------------------------------