├── CMLazyScrollViewController ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── CMLazyScrollViewController.xib │ └── CMLazyScrollViewController.swift ├── _Pods.xcodeproj ├── .travis.yml ├── Example ├── Pods │ ├── Target Support Files │ │ ├── CMPageControl │ │ │ ├── CMPageControl-prefix.pch │ │ │ ├── CMPageControl.modulemap │ │ │ ├── CMPageControl-dummy.m │ │ │ ├── CMPageControl-umbrella.h │ │ │ ├── CMPageControl.xcconfig │ │ │ └── Info.plist │ │ ├── CMLazyScrollViewController │ │ │ ├── CMLazyScrollViewController-prefix.pch │ │ │ ├── CMLazyScrollViewController.modulemap │ │ │ ├── CMLazyScrollViewController-dummy.m │ │ │ ├── CMLazyScrollViewController-umbrella.h │ │ │ ├── CMLazyScrollViewController.xcconfig │ │ │ └── Info.plist │ │ ├── Pods-CMLazyScrollViewController_Tests │ │ │ ├── Pods-CMLazyScrollViewController_Tests-acknowledgements.markdown │ │ │ ├── Pods-CMLazyScrollViewController_Tests.modulemap │ │ │ ├── Pods-CMLazyScrollViewController_Tests-dummy.m │ │ │ ├── Pods-CMLazyScrollViewController_Tests-umbrella.h │ │ │ ├── Pods-CMLazyScrollViewController_Tests.debug.xcconfig │ │ │ ├── Pods-CMLazyScrollViewController_Tests.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-CMLazyScrollViewController_Tests-acknowledgements.plist │ │ │ ├── Pods-CMLazyScrollViewController_Tests-frameworks.sh │ │ │ └── Pods-CMLazyScrollViewController_Tests-resources.sh │ │ └── Pods-CMLazyScrollViewController_Example │ │ │ ├── Pods-CMLazyScrollViewController_Example.modulemap │ │ │ ├── Pods-CMLazyScrollViewController_Example-dummy.m │ │ │ ├── Pods-CMLazyScrollViewController_Example-umbrella.h │ │ │ ├── Info.plist │ │ │ ├── Pods-CMLazyScrollViewController_Example.debug.xcconfig │ │ │ ├── Pods-CMLazyScrollViewController_Example.release.xcconfig │ │ │ ├── Pods-CMLazyScrollViewController_Example-acknowledgements.markdown │ │ │ ├── Pods-CMLazyScrollViewController_Example-acknowledgements.plist │ │ │ ├── Pods-CMLazyScrollViewController_Example-frameworks.sh │ │ │ └── Pods-CMLazyScrollViewController_Example-resources.sh │ ├── Manifest.lock │ ├── CMPageControl │ │ ├── LICENSE │ │ ├── README.md │ │ └── CMPageControl │ │ │ └── Classes │ │ │ └── CMPageControl.swift │ ├── Local Podspecs │ │ └── CMLazyScrollViewController.podspec.json │ └── Pods.xcodeproj │ │ └── xcuserdata │ │ └── Mycose.xcuserdatad │ │ └── xcschemes │ │ ├── CMPageControl.xcscheme │ │ ├── CMLazyScrollViewController.xcscheme │ │ ├── Pods-CMLazyScrollViewController_Tests.xcscheme │ │ └── Pods-CMLazyScrollViewController_Example.xcscheme ├── CMLazyScrollViewController │ ├── cars1.jpg │ ├── cars2.jpg │ ├── cars3.jpg │ ├── cars4.jpg │ ├── animal1.jpg │ ├── animal2.jpg │ ├── animal3.jpg │ ├── animal4.jpg │ ├── pokemon1.jpg │ ├── pokemon2.jpg │ ├── pokemon3.jpg │ ├── pokemon4.jpg │ ├── deadpool1.jpg │ ├── deadpool2.jpg │ ├── deadpool3.jpg │ ├── deadpool4.jpg │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ImageViewController.swift │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ ├── ViewController.swift │ ├── AppDelegate.swift │ ├── ImageViewController.xib │ ├── SwitchViewController.swift │ └── SwitchViewController.xib ├── Podfile ├── CMLazyScrollViewController.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── CMLazyScrollViewController-Example.xcscheme │ └── project.pbxproj ├── CMLazyScrollViewController.xcworkspace │ └── contents.xcworkspacedata ├── Podfile.lock └── Tests │ ├── Info.plist │ └── Tests.swift ├── CHANGELOG.md ├── LICENSE ├── CMLazyScrollViewController.podspec └── README.md /CMLazyScrollViewController/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CMLazyScrollViewController/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8.0 2 | language: swift -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/CMPageControl-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/cars1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/cars1.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/cars2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/cars2.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/cars3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/cars3.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/cars4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/cars4.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/animal1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/animal1.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/animal2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/animal2.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/animal3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/animal3.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/animal4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/animal4.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/pokemon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/pokemon1.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/pokemon2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/pokemon2.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/pokemon3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/pokemon3.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/pokemon4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/pokemon4.jpg -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/CMLazyScrollViewController-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/deadpool1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/deadpool1.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/deadpool2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/deadpool2.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/deadpool3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/deadpool3.jpg -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/deadpool4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mycose/CMLazyScrollViewController/HEAD/Example/CMLazyScrollViewController/deadpool4.jpg -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/CMPageControl.modulemap: -------------------------------------------------------------------------------- 1 | framework module CMPageControl { 2 | umbrella header "CMPageControl-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/CMPageControl-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CMPageControl : NSObject 3 | @end 4 | @implementation PodsDummy_CMPageControl 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/CMLazyScrollViewController.modulemap: -------------------------------------------------------------------------------- 1 | framework module CMLazyScrollViewController { 2 | umbrella header "CMLazyScrollViewController-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/CMLazyScrollViewController-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CMLazyScrollViewController : NSObject 3 | @end 4 | @implementation PodsDummy_CMLazyScrollViewController 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'CMLazyScrollViewController_Example' do 4 | pod 'CMLazyScrollViewController', :path => '../' 5 | 6 | target 'CMLazyScrollViewController_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/CMPageControl-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double CMPageControlVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char CMPageControlVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CMLazyScrollViewController_Tests { 2 | umbrella header "Pods-CMLazyScrollViewController_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_CMLazyScrollViewController_Example { 2 | umbrella header "Pods-CMLazyScrollViewController_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CMLazyScrollViewController_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CMLazyScrollViewController_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_CMLazyScrollViewController_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_CMLazyScrollViewController_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/CMLazyScrollViewController-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double CMLazyScrollViewControllerVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char CMLazyScrollViewControllerVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_CMLazyScrollViewController_TestsVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_CMLazyScrollViewController_TestsVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_CMLazyScrollViewController_ExampleVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_CMLazyScrollViewController_ExampleVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CMLazyScrollViewController (0.0.2): 3 | - CMPageControl (~> 0.0.3) 4 | - CMPageControl (0.0.3) 5 | 6 | DEPENDENCIES: 7 | - CMLazyScrollViewController (from `../`) 8 | 9 | EXTERNAL SOURCES: 10 | CMLazyScrollViewController: 11 | :path: "../" 12 | 13 | SPEC CHECKSUMS: 14 | CMLazyScrollViewController: 6b1265a0054ddfc72b6776706841940697a08ebb 15 | CMPageControl: 63c66975d32b4f9e32634824dc62a3fa544e6767 16 | 17 | PODFILE CHECKSUM: 082c2de6f79bfda0f5c16d0e453867ea864d1b62 18 | 19 | COCOAPODS: 1.1.1 20 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CMLazyScrollViewController (0.0.2): 3 | - CMPageControl (~> 0.0.3) 4 | - CMPageControl (0.0.3) 5 | 6 | DEPENDENCIES: 7 | - CMLazyScrollViewController (from `../`) 8 | 9 | EXTERNAL SOURCES: 10 | CMLazyScrollViewController: 11 | :path: "../" 12 | 13 | SPEC CHECKSUMS: 14 | CMLazyScrollViewController: 6b1265a0054ddfc72b6776706841940697a08ebb 15 | CMPageControl: 63c66975d32b4f9e32634824dc62a3fa544e6767 16 | 17 | PODFILE CHECKSUM: 082c2de6f79bfda0f5c16d0e453867ea864d1b62 18 | 19 | COCOAPODS: 1.1.1 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/CMPageControl.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CMPageControl 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [v0.0.2](https://github.com/Mycose/CMLazyScrollViewController/tree/v0.0.2) (2016-11-07) 4 | - Add vertical support 5 | - Add custom page control (my other pod CMPageControl) 6 | - Add position for custom page control (left/right/top/bottom), left and right are vertically 7 | - Add rotation support 8 | [Full Changelog](https://github.com/Mycose/CMLazyScrollViewController/compare/v0.0.1...v0.0.2) 9 | 10 | ## [v0.0.1](https://github.com/Mycose/CMLazyScrollViewController/tree/v0.0.1) (2016-10-21) 11 | 12 | 13 | \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/CMLazyScrollViewController.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/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 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController" "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl/CMPageControl.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController" "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl/CMPageControl.framework/Headers" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/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 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import CMLazyScrollViewController 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMPageControl/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 | 0.0.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CMLazyScrollViewController/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 | 0.0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController" "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl/CMPageControl.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "CMLazyScrollViewController" -framework "CMPageControl" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController" "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CMPageControl/CMPageControl.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "CMLazyScrollViewController" -framework "CMPageControl" 8 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 9 | PODS_BUILD_DIR = $BUILD_DIR 10 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Clément MORISSARD 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/CMPageControl/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Clément Morissard 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 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/CMLazyScrollViewController.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CMLazyScrollViewController", 3 | "version": "0.0.2", 4 | "summary": "Lazy ScrollView with support for infinite scroll (using a paging system with UIViewControllers and not UIViews)", 5 | "description": "CMLazyScrollViewController is a controller that I developped in first place to have an infinite carousel of images easily and that i don't have to redo it everytime. And I thought that it would be better than a basic carousel to have UIViewControllers instead of UIViews, to have more complex page. Also I choose to inherit from a UIViewController instead of a UIView because I wanted to be able to add childViewControllers", 6 | "homepage": "https://github.com/Mycose/CMLazyScrollViewController", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Clément Morissard": "morissard@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/Mycose/CMLazyScrollViewController.git", 16 | "tag": "0.0.2" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "CMLazyScrollViewController/Classes/**/*", 22 | "dependencies": { 23 | "CMPageControl": [ 24 | "~> 0.0.3" 25 | ] 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/ImageViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageViewController.swift 3 | // CMCarousel 4 | // 5 | // Created by Clément Morissard on 20/10/16. 6 | // Copyright © 2016 Clément Morissard. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ImageViewController: UIViewController { 12 | 13 | @IBOutlet var imageView : UIImageView! 14 | 15 | var imageName : String = "" 16 | 17 | override func awakeFromNib() { 18 | self.imageView.image = UIImage(named: imageName) 19 | } 20 | 21 | override func viewDidLoad() { 22 | super.viewDidLoad() 23 | self.imageView.image = UIImage(named: imageName) 24 | } 25 | 26 | 27 | 28 | override func didReceiveMemoryWarning() { 29 | super.didReceiveMemoryWarning() 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | 34 | /* 35 | // MARK: - Navigation 36 | 37 | // In a storyboard-based application, you will often want to do a little preparation before navigation 38 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 39 | // Get the new view controller using segue.destinationViewController. 40 | // Pass the selected object to the new view controller. 41 | } 42 | */ 43 | 44 | } 45 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/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 | 0.0.2 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 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/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 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CMCarousel 4 | // 5 | // Created by Clément Morissard on 17/10/16. 6 | // Copyright © 2016 Clément Morissard. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CMLazyScrollViewController 11 | 12 | class ViewController: UIViewController, CMLazyScrollViewControllerDelegate, UIScrollViewDelegate, SwitchViewControllerDelegate { 13 | 14 | var imageBasename : String = "deadpool" 15 | 16 | let switchVC = SwitchViewController() 17 | let carousel = CMLazyScrollViewController() 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | switchVC.delegate = self 22 | // Do any additional setup after loading the view, typically from a nib. 23 | 24 | carousel.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height) 25 | carousel.pageControlPaddingValue = 20.0 26 | carousel.canRotate = true 27 | carousel.pageControlPosition = .Left 28 | carousel.scrollDirection = .Horizontal 29 | carousel.infinite = true 30 | carousel.isPagingEnable = true 31 | carousel.delegate = self 32 | self.addChildViewController(carousel) 33 | self.view.addSubview(carousel.view) 34 | } 35 | 36 | override func didReceiveMemoryWarning() { 37 | super.didReceiveMemoryWarning() 38 | // Dispose of any resources that can be recreated. 39 | } 40 | 41 | // MARK: CMLazyScrollViewControllerDelegate 42 | func numberOfViewControllersIn(scrollViewController: CMLazyScrollViewController) -> Int { 43 | return 5 44 | } 45 | 46 | func viewControllerIn(scrollViewController: CMLazyScrollViewController, atIndex: Int) -> UIViewController { 47 | var vc : UIViewController = UIViewController() 48 | if (atIndex == 0) { 49 | vc = switchVC 50 | } else { 51 | vc = ImageViewController() 52 | (vc as? ImageViewController)!.imageName = "\(self.imageBasename)\(atIndex).jpg" 53 | } 54 | return vc 55 | } 56 | 57 | func newImageBasename(imagebasename: String) { 58 | self.imageBasename = imagebasename 59 | self.carousel.reload() 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /CMLazyScrollViewController.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint CMLazyScrollViewController.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'CMLazyScrollViewController' 11 | s.version = '0.0.2' 12 | s.summary = 'Lazy ScrollView with support for infinite scroll (using a paging system with UIViewControllers and not UIViews)' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = "CMLazyScrollViewController is a controller that I developped in first place to have an infinite carousel of images easily and that i don't have to redo it everytime. And I thought that it would be better than a basic carousel to have UIViewControllers instead of UIViews, to have more complex page. Also I choose to inherit from a UIViewController instead of a UIView because I wanted to be able to add childViewControllers" 21 | 22 | s.homepage = 'https://github.com/Mycose/CMLazyScrollViewController' 23 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 24 | s.license = { :type => 'MIT', :file => 'LICENSE' } 25 | s.author = { 'Clément Morissard' => 'morissard@gmail.com' } 26 | s.source = { :git => 'https://github.com/Mycose/CMLazyScrollViewController.git', :tag => s.version.to_s } 27 | # s.social_media_url = 'https://twitter.com/' 28 | 29 | s.ios.deployment_target = '8.0' 30 | 31 | s.source_files = 'CMLazyScrollViewController/Classes/**/*' 32 | 33 | # s.resource_bundles = { 34 | # 'CMLazyScrollViewController' => ['CMLazyScrollViewController/Assets/*.png'] 35 | # } 36 | 37 | # s.public_header_files = 'Pod/Classes/**/*.h' 38 | # s.frameworks = 'UIKit', 'MapKit' 39 | s.dependency 'CMPageControl', '~> 0.0.3' 40 | end 41 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CMLazyScrollViewController 4 | // 5 | // Created by Clément Morissard on 10/21/2016. 6 | // Copyright (c) 2016 Clément Morissard. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/Mycose.xcuserdatad/xcschemes/CMPageControl.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/Mycose.xcuserdatad/xcschemes/CMLazyScrollViewController.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CMLazyScrollViewController 5 | 6 | MIT License 7 | 8 | Copyright (c) 2016 Clément MORISSARD 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | 29 | ## CMPageControl 30 | 31 | Copyright (c) 2016 Clément Morissard 32 | 33 | Permission is hereby granted, free of charge, to any person obtaining a copy 34 | of this software and associated documentation files (the "Software"), to deal 35 | in the Software without restriction, including without limitation the rights 36 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 37 | copies of the Software, and to permit persons to whom the Software is 38 | furnished to do so, subject to the following conditions: 39 | 40 | The above copyright notice and this permission notice shall be included in 41 | all copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 45 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 46 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 47 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 48 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 49 | THE SOFTWARE. 50 | 51 | Generated by CocoaPods - https://cocoapods.org 52 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/Mycose.xcuserdatad/xcschemes/Pods-CMLazyScrollViewController_Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/Mycose.xcuserdatad/xcschemes/Pods-CMLazyScrollViewController_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/ImageViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/SwitchViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BoutonViewController.swift 3 | // CMCarousel 4 | // 5 | // Created by Clément Morissard on 20/10/16. 6 | // Copyright © 2016 Clément Morissard. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | protocol SwitchViewControllerDelegate { 12 | func newImageBasename(imagebasename: String) 13 | } 14 | 15 | class SwitchViewController: UIViewController { 16 | 17 | @IBOutlet var buttons : [UIButton]! 18 | 19 | @IBOutlet var deadpoolButton : UIButton! 20 | @IBOutlet var carsButton : UIButton! 21 | @IBOutlet var animalsButton : UIButton! 22 | @IBOutlet var pokemonsButton : UIButton! 23 | 24 | var delegate : SwitchViewControllerDelegate? 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | // Do any additional setup after loading the view. 29 | self.deadpoolButton.layer.borderColor = UIColor(red: 58.0/255.0, green: 95.0/255.0, blue: 205.0/255.0, alpha: 1.0).cgColor 30 | self.deadpoolButton.layer.borderWidth = 1.0 31 | 32 | self.carsButton.layer.borderColor = UIColor(red: 58.0/255.0, green: 95.0/255.0, blue: 205.0/255.0, alpha: 1.0).cgColor 33 | self.carsButton.layer.borderWidth = 1.0 34 | 35 | self.animalsButton.layer.borderColor = UIColor(red: 58.0/255.0, green: 95.0/255.0, blue: 205.0/255.0, alpha: 1.0).cgColor 36 | self.animalsButton.layer.borderWidth = 1.0 37 | 38 | self.pokemonsButton.layer.borderColor = UIColor(red: 58.0/255.0, green: 95.0/255.0, blue: 205.0/255.0, alpha: 1.0).cgColor 39 | self.pokemonsButton.layer.borderWidth = 1.0 40 | } 41 | 42 | override func viewWillAppear(_ animated: Bool) { 43 | super.viewWillAppear(animated) 44 | } 45 | 46 | override func viewWillDisappear(_ animated: Bool) { 47 | super.viewWillDisappear(animated) 48 | } 49 | 50 | override func didReceiveMemoryWarning() { 51 | super.didReceiveMemoryWarning() 52 | // Dispose of any resources that can be recreated. 53 | } 54 | 55 | func resetAllButtons() { 56 | for button in self.buttons { 57 | button.isSelected = false 58 | button.backgroundColor = UIColor.white 59 | } 60 | } 61 | 62 | @IBAction func deadpoolButtonClicked() { 63 | self.resetAllButtons() 64 | self.deadpoolButton.isSelected = true 65 | self.deadpoolButton.backgroundColor = UIColor.black 66 | self.delegate?.newImageBasename(imagebasename: "deadpool") 67 | } 68 | 69 | @IBAction func carsButtonClicked() { 70 | self.resetAllButtons() 71 | self.carsButton.isSelected = true 72 | self.carsButton.backgroundColor = UIColor.black 73 | self.delegate?.newImageBasename(imagebasename: "cars") 74 | } 75 | 76 | @IBAction func animalButtonClicked() { 77 | self.resetAllButtons() 78 | self.animalsButton.isSelected = true 79 | self.animalsButton.backgroundColor = UIColor.black 80 | self.delegate?.newImageBasename(imagebasename: "animal") 81 | } 82 | 83 | @IBAction func pokemonsButtonClicked() { 84 | self.resetAllButtons() 85 | self.pokemonsButton.isSelected = true 86 | self.pokemonsButton.backgroundColor = UIColor.black 87 | self.delegate?.newImageBasename(imagebasename: "pokemon") 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CMLazyScrollViewController 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/CMLazyScrollViewController.svg?style=flat)](http://cocoapods.org/pods/CMLazyScrollViewController) 4 | [![License](https://img.shields.io/cocoapods/l/CMLazyScrollViewController.svg?style=flat)](http://cocoapods.org/pods/CMLazyScrollViewController) 5 | [![Platform](https://img.shields.io/cocoapods/p/CMLazyScrollViewController.svg?style=flat)](http://cocoapods.org/pods/CMLazyScrollViewController) 6 | 7 | ## Example 8 | 9 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 10 | or 11 | https://appetize.io/app/qcb2rwc82uu53thuy2efvez6hr?device=iphone5s&scale=75&orientation=portrait&osVersion=9.3 12 | 13 | ## Future 14 | - Smoothen the animation when you end dragging on infinite mode without pagging 15 | - Any ideas or request ? 16 | 17 | ## Algorithm 18 | 19 | For the infinite carousel/scroll etc... I see only two possibilities: 20 | 1- Use a UICollectionView or UITableView, setting the number of elements to a really high value, and scroll at the middle at the beginning, and then play with / and % to have the right index everytime 21 | 2- Imagine you have a UIScrollView with pages like this 1 2 3 4 5. Basically you just want to have 5 1 2 3 4 5 1, and when the user scroll and arrive on the first 1 or the second 5, you want to scroll back at the beginning or the end without animation and seemlessly, it create the feeling of infinity since you will basically scroll over and over on the same elements 22 | 23 | In this projet I used the second way 24 | 25 | ## CMLazyScrollViewController 26 | CMLazyScrollViewController is a UIViewController which has a UIScrollView and UIPageControl. 27 | The delegation of the CMLazyScrollViewController ask for UIViewController to put in the scroll view on a page system 28 | There is a lazy option (only 3 per 3 view controllers in the memory) and infinite mode. 29 | 30 | ## CMLazyScrollViewController Properties: 31 | ```swift 32 | // properties for the scrollview 33 | public var isPagingEnable = true 34 | public var isHorizontalScrollIndicatorHidden = false 35 | public var isVerticalScrollIndicatorHidden = false 36 | // scroll view delegate which will be call after every delegate function 37 | public var scrollDelegate : UIScrollViewDelegate? 38 | ``` 39 | 40 | ## CMLazyScrollViewController Usage Example: 41 | ```swift 42 | let carousel = CMLazyScrollViewController() 43 | carousel.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height) 44 | carousel.infinite = true 45 | carousel.isPagingEnable = true 46 | carousel.delegate = self 47 | self.addChildViewController(carousel) 48 | self.view.addSubview(carousel.view) 49 | ``` 50 | 51 | ## CMLazyScrollViewController Delegation : CMLazyScrollViewControllerDelegate 52 | ```swift 53 | // ask for the number of view in the controller 54 | func numberOfViewControllersIn(scrollViewController : CMLazyScrollViewController) -> Int 55 | // request a view controller to show at the index 56 | func viewControllerIn(scrollViewController : CMLazyScrollViewController, atIndex: Int) -> UIViewController 57 | ``` 58 | 59 | ## Installation 60 | CMLazyScrollViewController is available through [CocoaPods](http://cocoapods.org). To install 61 | it, simply add the following line to your Podfile: 62 | 63 | ```ruby 64 | pod 'CMLazyScrollViewController' 65 | ``` 66 | 67 | ## Author 68 | Mycose, morissard@gmail.com 69 | 70 | ## License 71 | CMLazyScrollViewController is available under the MIT license. See the LICENSE file for more info. 72 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /CMLazyScrollViewController/Classes/CMLazyScrollViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | MIT License 18 | 19 | Copyright (c) 2016 Clément MORISSARD 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | CMLazyScrollViewController 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Copyright (c) 2016 Clément Morissard <morissard@gmail.com> 49 | 50 | Permission is hereby granted, free of charge, to any person obtaining a copy 51 | of this software and associated documentation files (the "Software"), to deal 52 | in the Software without restriction, including without limitation the rights 53 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 54 | copies of the Software, and to permit persons to whom the Software is 55 | furnished to do so, subject to the following conditions: 56 | 57 | The above copyright notice and this permission notice shall be included in 58 | all copies or substantial portions of the Software. 59 | 60 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 61 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 62 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 63 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 64 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 65 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 66 | THE SOFTWARE. 67 | 68 | License 69 | MIT 70 | Title 71 | CMPageControl 72 | Type 73 | PSGroupSpecifier 74 | 75 | 76 | FooterText 77 | Generated by CocoaPods - https://cocoapods.org 78 | Title 79 | 80 | Type 81 | PSGroupSpecifier 82 | 83 | 84 | StringsTable 85 | Acknowledgements 86 | Title 87 | Acknowledgements 88 | 89 | 90 | -------------------------------------------------------------------------------- /Example/Pods/CMPageControl/README.md: -------------------------------------------------------------------------------- 1 | # CMPageControl 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/CMPageControl.svg?style=flat)](http://cocoapods.org/pods/CMPageControl) 4 | [![License](https://img.shields.io/cocoapods/l/CMPageControl.svg?style=flat)](http://cocoapods.org/pods/CMPageControl) 5 | [![Platform](https://img.shields.io/cocoapods/p/CMPageControl.svg?style=flat)](http://cocoapods.org/pods/CMPageControl) 6 | 7 | ## Example 8 | 9 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 10 | 11 | ## Future 12 | - Maybe remove the delegation since it's an UIControl 13 | - Animation for changing selected element 14 | - Any ideas or request ? 15 | 16 | ## CMPageControl 17 | CMPageControl is a UIControl working like a UIPageControl but support horizontal/vertical display and is customisable. 18 | Currently you can customize the borderWidth, the backgroundColor, the borderColor and an image if you want images instead of basic views 19 | 20 | ## CMPageControl Properties: 21 | ```swift 22 | // current index, will apply selected style if you set manually 23 | @IBInspectable public var currentIndex : Int = 0 24 | 25 | // when set will "setup" the views 26 | @IBInspectable public var numberOfElements : Int = 0 27 | 28 | // to selecte if round or square 29 | @IBInspectable public var isRounded : Bool = true 30 | 31 | // unselected image 32 | @IBInspectable public var elementImage : UIImage? 33 | 34 | // unselected background color 35 | @IBInspectable public var elementBackgroundColor : UIColor = UIColor.gray 36 | 37 | // unselected border color 38 | @IBInspectable public var elementBorderColor : UIColor = UIColor.gray 39 | 40 | // unselected border width 41 | @IBInspectable public var elementBorderWidth : CGFloat = 1.0 42 | 43 | // element cornerRadius 44 | @IBInspectable public var elementCornerRadius : CGFloat = 5.0 45 | 46 | // selected image 47 | @IBInspectable public var elementSelectedImage : UIImage? { 48 | 49 | // selected background color 50 | @IBInspectable public var elementSelectedBackgroundColor : UIColor = UIColor.white 51 | 52 | // selected border color 53 | @IBInspectable public var elementSelectedBorderColor : UIColor = UIColor.white 54 | 55 | // selected border width 56 | @IBInspectable public var elementSelectedBorderWidth : CGFloat = 2.0 57 | 58 | // element width and height 59 | @IBInspectable public var elementWidth : CGFloat = 10.0 60 | 61 | // if you want the view to be aligned vertically or horizontally 62 | public var orientation : CMPageControlOrientation = .Horizontal 63 | 64 | public var delegate : CMPageControlDelegate? 65 | ``` 66 | 67 | ## CMPageControl Usage Example: 68 | ```swift 69 | self.pageControl = CMPageControl(frame: CGRect(x: 0, y: 40, width: 40, height: 200)) 70 | self.pageControl?.numberOfElements = 5 71 | self.pageControl?.elementImage = image 72 | self.pageControl?.elementSelectedImage = selectedImage 73 | self.pageControl?.elementBackgroundColor = UIColor.clear 74 | self.pageControl?.elementWidth = 20.0 75 | self.pageControl?.elementBorderWidth = 0.0 76 | self.pageControl?.elementSelectedBorderWidth = 0.0 77 | self.pageControl?.elementSelectedBackgroundColor = UIColor.clear 78 | self.pageControl?.orientation = .Vertical 79 | self.view.addSubview(self.pageControl!) 80 | ``` 81 | 82 | ## CMPageControl Delegation : CMPageControlDelegate 83 | ```swift 84 | /!\ might disappear because the UIControl should do the same 85 | // called when a view is clicked 86 | func elementClicked(pageControl : CMPageControl, atIndex: Int) 87 | // decide if the index should change after the click 88 | func shouldChangeIndex(from : Int, to : Int) -> Bool 89 | ``` 90 | 91 | ## Installation 92 | 93 | CMPageControl is available through [CocoaPods](http://cocoapods.org). To install 94 | it, simply add the following line to your Podfile: 95 | 96 | ```ruby 97 | pod "CMPageControl" 98 | ``` 99 | 100 | ## Author 101 | 102 | Clément Morissard, morissard@gmail.com 103 | 104 | ## License 105 | 106 | CMPageControl is available under the MIT license. See the LICENSE file for more info. 107 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework" 88 | install_framework "$BUILT_PRODUCTS_DIR/CMPageControl/CMPageControl.framework" 89 | fi 90 | if [[ "$CONFIGURATION" == "Release" ]]; then 91 | install_framework "$BUILT_PRODUCTS_DIR/CMLazyScrollViewController/CMLazyScrollViewController.framework" 92 | install_framework "$BUILT_PRODUCTS_DIR/CMPageControl/CMPageControl.framework" 93 | fi 94 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController.xcodeproj/xcshareddata/xcschemes/CMLazyScrollViewController-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | install_resource() 27 | { 28 | if [[ "$1" = /* ]] ; then 29 | RESOURCE_PATH="$1" 30 | else 31 | RESOURCE_PATH="${PODS_ROOT}/$1" 32 | fi 33 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 34 | cat << EOM 35 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 36 | EOM 37 | exit 1 38 | fi 39 | case $RESOURCE_PATH in 40 | *.storyboard) 41 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 42 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 43 | ;; 44 | *.xib) 45 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 46 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 47 | ;; 48 | *.framework) 49 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 50 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 51 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 52 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | ;; 54 | *.xcdatamodel) 55 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 56 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 57 | ;; 58 | *.xcdatamodeld) 59 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 60 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 61 | ;; 62 | *.xcmappingmodel) 63 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 64 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 65 | ;; 66 | *.xcassets) 67 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 68 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 69 | ;; 70 | *) 71 | echo "$RESOURCE_PATH" 72 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 73 | ;; 74 | esac 75 | } 76 | 77 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 78 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 79 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 80 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | fi 83 | rm -f "$RESOURCES_TO_COPY" 84 | 85 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 86 | then 87 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 88 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 89 | while read line; do 90 | if [[ $line != "${PODS_ROOT}*" ]]; then 91 | XCASSET_FILES+=("$line") 92 | fi 93 | done <<<"$OTHER_XCASSETS" 94 | 95 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 96 | fi 97 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController/SwitchViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 39 | 50 | 61 | 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 | -------------------------------------------------------------------------------- /Example/Pods/CMPageControl/CMPageControl/Classes/CMPageControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CMPageControl.swift 3 | // CMPageControl 4 | // 5 | // Created by Clément Morissard on 26/10/16. 6 | // Copyright © 2016 Clément Morissard. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public enum CMPageControlOrientation : Int { 12 | case Horizontal = 0 13 | case Vertical = 1 14 | } 15 | 16 | public protocol CMPageControlDelegate { 17 | func elementClicked(pageControl : CMPageControl, atIndex: Int) 18 | func shouldChangeIndex(from : Int, to : Int) -> Bool 19 | } 20 | 21 | @IBDesignable 22 | public class CMPageControl: UIControl { 23 | 24 | // MARK: - PRIVATE PROPERTIES 25 | fileprivate var currentView : UIView? 26 | 27 | fileprivate var views : [UIView?] = [] 28 | fileprivate var imageViews : [UIImageView?] = [] 29 | fileprivate var buttons : [UIButton?] = [] 30 | 31 | fileprivate var buttonWidth : CGFloat = 10.0 32 | 33 | fileprivate func cleanViews() { 34 | for view in views { 35 | if let view = view { 36 | view.removeFromSuperview() 37 | views[view.tag] = nil 38 | } 39 | } 40 | for button in buttons { 41 | if let btn = button { 42 | btn.removeFromSuperview() 43 | buttons[btn.tag] = nil 44 | } 45 | } 46 | } 47 | 48 | // MARK: - PUBLIC PROPERTIES 49 | public var currentIndex : Int = 0 { 50 | didSet { 51 | if currentIndex < 0 || currentIndex > numberOfElements-1 { return } 52 | 53 | for view in views { 54 | if let view = view { 55 | if view.tag == currentIndex { 56 | currentView = view 57 | setSelectedStyleForView(view: view, animated: true) 58 | } else { 59 | setUnselectedStyleForView(view: view, animated: true) 60 | } 61 | } 62 | } 63 | } 64 | } 65 | 66 | @IBInspectable public var numberOfElements : Int = 0 { 67 | didSet { 68 | setup() 69 | } 70 | } 71 | 72 | @IBInspectable public var elementSpacing : CGFloat = 10.0 73 | 74 | @IBInspectable public var elementWidth : CGFloat = 7.0 { 75 | didSet { 76 | buttonWidth = elementWidth * 1.5 77 | } 78 | } 79 | 80 | @IBInspectable public var elementCornerRadius : CGFloat = 5.0 { 81 | didSet { 82 | if (isRounded == true) { 83 | for view in views { 84 | if let view = view { 85 | view.layer.masksToBounds = true 86 | view.layer.cornerRadius = elementCornerRadius 87 | } 88 | } 89 | } 90 | } 91 | } 92 | 93 | @IBInspectable public var isRounded : Bool = true { 94 | didSet { 95 | for view in views { 96 | if let view = view { 97 | if (isRounded == true) { 98 | view.layer.masksToBounds = true 99 | view.layer.cornerRadius = elementCornerRadius 100 | } else { 101 | view.layer.masksToBounds = false 102 | view.layer.cornerRadius = 0 103 | } 104 | } 105 | } 106 | } 107 | } 108 | 109 | @IBInspectable public var elementImage : UIImage? { 110 | didSet { 111 | setup() 112 | } 113 | } 114 | 115 | @IBInspectable public var elementBackgroundColor : UIColor = UIColor.white.withAlphaComponent(0.2) { 116 | didSet { 117 | for view in views { 118 | if let view = view, view != currentView { 119 | view.backgroundColor = elementBackgroundColor 120 | } 121 | } 122 | } 123 | } 124 | 125 | @IBInspectable public var elementBorderColor : UIColor = UIColor.clear { 126 | didSet { 127 | for view in views { 128 | if let view = view, view != currentView { 129 | view.layer.borderColor = elementBorderColor.cgColor 130 | } 131 | } 132 | } 133 | } 134 | 135 | @IBInspectable public var elementBorderWidth : CGFloat = 0.0 { 136 | didSet { 137 | for view in views { 138 | if let view = view, view != currentView { 139 | view.layer.borderWidth = elementBorderWidth 140 | } 141 | } 142 | } 143 | } 144 | 145 | @IBInspectable public var elementSelectedImage : UIImage? { 146 | didSet { 147 | if let view = currentView as? UIImageView { 148 | view.image = elementSelectedImage 149 | } 150 | } 151 | } 152 | 153 | @IBInspectable public var elementSelectedBackgroundColor : UIColor = UIColor.white { 154 | didSet { 155 | if let view = currentView { 156 | view.backgroundColor = elementSelectedBackgroundColor 157 | } 158 | } 159 | } 160 | 161 | @IBInspectable public var elementSelectedBorderColor : UIColor = UIColor.clear { 162 | didSet { 163 | if let view = currentView { 164 | view.layer.borderColor = elementSelectedBorderColor.cgColor 165 | } 166 | } 167 | } 168 | 169 | @IBInspectable public var elementSelectedBorderWidth : CGFloat = 0.0 { 170 | didSet { 171 | if let view = currentView { 172 | view.layer.borderWidth = elementSelectedBorderWidth 173 | } 174 | } 175 | } 176 | 177 | @IBInspectable public var orientation : CMPageControlOrientation = .Horizontal { 178 | didSet { 179 | setup() 180 | } 181 | } 182 | 183 | public var delegate : CMPageControlDelegate? 184 | 185 | fileprivate func setup() { 186 | cleanViews() 187 | 188 | let nbSpace : Int = numberOfElements + 1 189 | var spaceWidth : CGFloat = 0.0 190 | var xPos : CGFloat = 0.0 191 | var yPos : CGFloat = 0.0 192 | 193 | views = Array(repeating: nil, count: numberOfElements) 194 | buttons = Array(repeating: nil, count: numberOfElements) 195 | for i in 0.. Int 32 | func viewControllerIn(scrollViewController : CMLazyScrollViewController, atIndex: Int) -> UIViewController 33 | } 34 | 35 | public class CMLazyScrollViewController : UIViewController, UIScrollViewDelegate { 36 | 37 | // MARK: - PageControl Constraints 38 | fileprivate var currentPageControlConstraints : [NSLayoutConstraint] = [] 39 | @IBOutlet fileprivate var pageControlBottomConstraint : NSLayoutConstraint! 40 | 41 | // MARK: - PRIVATE IBOUTLET 42 | @IBOutlet fileprivate var scrollView : UIScrollView! 43 | 44 | // MARK: - PRIVATE PROPERTIES 45 | 46 | // current index of the scrollview 47 | fileprivate var currentIndex : Int = 0 { 48 | didSet { 49 | if (oldValue != currentIndex) { 50 | updateCarousel() 51 | } 52 | } 53 | } 54 | 55 | // used to store view controllers 56 | fileprivate var viewControllers : [UIViewController?] = [] 57 | // used to store views 58 | fileprivate var views : [UIView?] = [] 59 | 60 | fileprivate var targetContentOffset : CGPoint? 61 | 62 | // to store the old offset from the scrollview to determine the direction of the scroll 63 | fileprivate var lastScrollViewOffset : CGPoint? 64 | // size of a page of the scrollview, set during the view did load with the frame 65 | fileprivate var pageSize = CGSize(width: 0, height: 0) 66 | // number of views in the scrollview, ask by delegate after setting the delegate 67 | fileprivate var numberOfViews : Int = 0 68 | 69 | // PROPERTIES AND GETTER/SETTER 70 | // used to set the current page with animation or not 71 | public func setCurrentPage(newValue : Int, animated : Bool) { 72 | let x = (scrollDirection == .Horizontal) ? CGFloat(newValue)*pageSize.width : 0 73 | let y = (scrollDirection == .Horizontal) ? 0 : CGFloat(newValue)*pageSize.height 74 | scrollView.scrollRectToVisible(CGRect(x: x, y: y, width: pageSize.width, height: pageSize.height), animated: animated) 75 | currentIndex = newValue 76 | } 77 | 78 | // get current index 79 | public func currentPage() -> Int { 80 | return fixIndex(index: currentIndex) 81 | } 82 | 83 | // get view controller at index, can return nil if view controller never created are not in stored anymore 84 | public func viewController(atIndex : Int) -> UIViewController? { 85 | if atIndex > 0 && atIndex < numberOfViews { 86 | return viewControllers[atIndex] 87 | } 88 | return nil 89 | } 90 | 91 | // true if it should rotate and detect rotation 92 | public var canRotate : Bool = false { 93 | didSet { 94 | if canRotate == true { 95 | NotificationCenter.default.addObserver(self, selector: #selector(screenDidRotate), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil) 96 | } else { 97 | NotificationCenter.default.removeObserver(self) 98 | } 99 | } 100 | } 101 | 102 | public var pageControlPaddingValue : CGFloat = 0.0 { 103 | didSet { 104 | refreshPageControlConstraint() 105 | } 106 | } 107 | 108 | // if false it will be vertical 109 | public var scrollDirection : CMLazyScrollViewDirection = .Horizontal 110 | 111 | public var pageControlPosition : CMPageControlPosition = .Bottom { 112 | didSet { 113 | refreshPageControlConstraint() 114 | } 115 | } 116 | 117 | // view controllers will be instantiated only once if true 118 | // if it's false, there will only be 3 per 3 view controllers in the memory (current, previous and next) 119 | public var isLazy = true 120 | 121 | // if the scrollview is infite or not, basically if it's yes, i consider there is 2 mores views in the scrollview like: 1 2 3 becomes 3 1 2 3 1. 122 | // if you arrive on the first or last element, i scroll to the n-1 or index 1 element 123 | public var infinite = false { 124 | didSet { 125 | reload() 126 | } 127 | } 128 | 129 | public var isPagerHidden = false { 130 | didSet { 131 | pageControl.isHidden = isPagerHidden 132 | } 133 | } 134 | 135 | // MARK: - PUBLIC PROPERTIES 136 | @IBOutlet public var pageControl : CMPageControl! 137 | 138 | // MARK: - PUBLIC SCROLL VIEW PROPERTIES 139 | public var isPagingEnable = true { 140 | didSet { 141 | scrollView.isPagingEnabled = isPagingEnable 142 | } 143 | } 144 | 145 | public var isHorizontalScrollIndicatorHidden = false { 146 | didSet { 147 | scrollView.showsHorizontalScrollIndicator = isHorizontalScrollIndicatorHidden 148 | } 149 | } 150 | 151 | public var isVerticalScrollIndicatorHidden = false { 152 | didSet { 153 | scrollView.showsVerticalScrollIndicator = isVerticalScrollIndicatorHidden 154 | } 155 | } 156 | 157 | // scroll view delegate which will be call after every delegate function 158 | public var scrollDelegate : UIScrollViewDelegate? 159 | 160 | // carousel view controller delegate 161 | public var delegate : CMLazyScrollViewControllerDelegate? { 162 | didSet { 163 | reload() 164 | } 165 | } 166 | 167 | // MARK: - PUBLIC FUNCTIONS 168 | // remove all views and rebuild the carousel 169 | public func reload() { 170 | if let delegate = delegate { 171 | 172 | pageSize = view.frame.size 173 | cleanArray() 174 | 175 | numberOfViews = delegate.numberOfViewControllersIn(scrollViewController: self) 176 | pageControl.numberOfElements = numberOfViews 177 | if infinite == true { 178 | numberOfViews += 2 179 | } 180 | 181 | let width = (scrollDirection == .Horizontal) ? CGFloat(numberOfViews)*pageSize.width : pageSize.width 182 | let height = (scrollDirection == .Horizontal) ? pageSize.height : CGFloat(numberOfViews)*pageSize.height 183 | scrollView.contentSize = CGSize(width: width, height: height) 184 | viewControllers = Array(repeating: nil, count: numberOfViews) 185 | views = Array(repeating: nil, count: numberOfViews) 186 | 187 | 188 | let x = (infinite == true && scrollDirection == .Horizontal) ? pageSize.width : 0 189 | let y = (infinite == true && scrollDirection == .Vertical) ? pageSize.height : 0 190 | 191 | scrollView.contentOffset = CGPoint(x: x, y: y) 192 | currentIndex = (infinite == true) ? 1 : 0 193 | updateCarousel() 194 | } 195 | } 196 | 197 | // MARK: - PRIVATE FUNCTIONS 198 | fileprivate func requestAndAddViewControllerAt(index : Int) { 199 | let fixedIndex = fixIndex(index: index) 200 | var vc : UIViewController! 201 | 202 | if viewControllers[index] != nil { 203 | vc = viewControllers[index]! 204 | } else { 205 | vc = delegate?.viewControllerIn(scrollViewController: self, atIndex: fixedIndex) ?? UIViewController() 206 | } 207 | 208 | // force frame to the size of a page 209 | vc.view.frame = CGRect(x: 0.0, y: 0.0, width: pageSize.width, height: pageSize.height) 210 | addChildViewController(vc) 211 | 212 | let x : CGFloat = (scrollDirection == .Horizontal) ? CGFloat(index)*pageSize.width : 0.0 213 | let y : CGFloat = (scrollDirection == .Horizontal) ? 0.0 : CGFloat(index)*pageSize.height 214 | // TODO: if i dont use a view here the constraint from the vc.view will break because of the scrollView, i tried to do some autolayout with the views i added but no success :( 215 | let view = UIView(frame: CGRect(x: x, y: y, width: pageSize.width, height: pageSize.height)) 216 | view.tag = index 217 | view.addSubview(vc.view) 218 | 219 | scrollView.addSubview(view) 220 | views[index] = view 221 | viewControllers[index] = vc 222 | vc.didMove(toParentViewController: self) 223 | } 224 | 225 | fileprivate func fixIndex(index : Int) -> Int { 226 | var fixedIndex = index 227 | 228 | // if it's infinite, i fix the index to not ask views which does not exist 229 | if infinite == true { 230 | if index == 0 { 231 | fixedIndex = numberOfViews-3 232 | } else if (index == numberOfViews-1) { 233 | fixedIndex = 0 234 | } else { 235 | fixedIndex -= 1 236 | } 237 | } 238 | return fixedIndex 239 | } 240 | 241 | fileprivate func updateCarousel() { 242 | let i = currentIndex 243 | 244 | if i < 0 { return } 245 | 246 | if i != 0 { 247 | requestAndAddViewControllerAt(index: i-1) 248 | } 249 | if i < numberOfViews-1 { 250 | requestAndAddViewControllerAt(index: i) 251 | requestAndAddViewControllerAt(index: i+1) 252 | } 253 | } 254 | 255 | // clean all the array 256 | fileprivate func cleanArray() { 257 | for i in 0.. scrollView.contentOffset.x)) { 290 | scrollView.scrollRectToVisible(CGRect(x: scrollView.contentSize.width-(pageSize.width*2)+rest, y: 0, width: pageSize.width, height: pageSize.height), animated: false) 291 | // targetcontentoffset is set at the end draging event and allow to finish the movement after the scrollrecttovisible 292 | if let _ = targetContentOffset { 293 | scrollView.scrollRectToVisible(CGRect(x: scrollView.contentSize.width-(pageSize.width*2), y: 0, width: pageSize.width, height: pageSize.height), animated: true) 294 | } 295 | targetContentOffset = nil 296 | } 297 | } 298 | 299 | // check if index is at the end or begin and decide if it should scroll or not 300 | fileprivate func checkDidScrollInfiniteModeWithY(scrollView: UIScrollView) { 301 | let rest = scrollView.contentOffset.y.truncatingRemainder(dividingBy: pageSize.height) 302 | if (currentIndex == numberOfViews-1) { 303 | scrollView.scrollRectToVisible(CGRect(x: 0, y: rest, width: pageSize.width, height: pageSize.height), animated: false) 304 | if let _ = targetContentOffset { 305 | scrollView.scrollRectToVisible(CGRect(x: 0, y: pageSize.height, width: pageSize.width, height: pageSize.height), animated: true) 306 | } 307 | targetContentOffset = nil 308 | } else if (currentIndex == 0 && (lastScrollViewOffset != nil) && (lastScrollViewOffset!.y > scrollView.contentOffset.y)) { 309 | scrollView.scrollRectToVisible(CGRect(x: 0, y: scrollView.contentSize.height-(pageSize.height*2)+rest, width: pageSize.width, height: pageSize.height), animated: false) 310 | 311 | if let _ = targetContentOffset { 312 | scrollView.scrollRectToVisible(CGRect(x: 0, y: scrollView.contentSize.height-(pageSize.height*2), width: pageSize.width, height: pageSize.height), animated: true) 313 | } 314 | targetContentOffset = nil 315 | } 316 | } 317 | 318 | // add constraint for the page control to put it on the left/top/bottom/right 319 | fileprivate func refreshPageControlConstraint() { 320 | self.view.removeConstraints(currentPageControlConstraints) 321 | switch pageControlPosition { 322 | case .Top: 323 | let topConstraint = NSLayoutConstraint(item: pageControl, attribute: .top, relatedBy: .equal, toItem: self.view, attribute: .top, multiplier: 1.0, constant: pageControlPaddingValue) 324 | let leadingConstraint = NSLayoutConstraint(item: pageControl, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leading, multiplier: 1.0, constant: 0.0) 325 | let trailingConstraint = NSLayoutConstraint(item: pageControl, attribute: .trailing, relatedBy: .equal, toItem: self.view, attribute: .trailing, multiplier: 1.0, constant: 0.0) 326 | let heightConstraint = NSLayoutConstraint(item: pageControl, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1.0, constant: 40.0) 327 | currentPageControlConstraints = [topConstraint, leadingConstraint, trailingConstraint, heightConstraint] 328 | self.view.addConstraints(currentPageControlConstraints) 329 | pageControl.orientation = .Horizontal 330 | break 331 | case .Bottom: 332 | let botConstraint = NSLayoutConstraint(item: pageControl, attribute: .bottom, relatedBy: .equal, toItem: self.view, attribute: .bottom, multiplier: 1.0, constant: -pageControlPaddingValue) 333 | let leadingConstraint = NSLayoutConstraint(item: pageControl, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leading, multiplier: 1.0, constant: 0.0) 334 | let trailingConstraint = NSLayoutConstraint(item: pageControl, attribute: .trailing, relatedBy: .equal, toItem: self.view, attribute: .trailing, multiplier: 1.0, constant: 0.0) 335 | let heightConstraint = NSLayoutConstraint(item: pageControl, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1.0, constant: 40.0) 336 | currentPageControlConstraints = [botConstraint, leadingConstraint, trailingConstraint, heightConstraint] 337 | self.view.addConstraints(currentPageControlConstraints) 338 | pageControl.orientation = .Horizontal 339 | break 340 | case .Left: 341 | let topConstraint = NSLayoutConstraint(item: pageControl, attribute: .top, relatedBy: .equal, toItem: self.view, attribute: .top, multiplier: 1.0, constant: 0.0) 342 | let leadingConstraint = NSLayoutConstraint(item: pageControl, attribute: .leading, relatedBy: .equal, toItem: self.view, attribute: .leading, multiplier: 1.0, constant: pageControlPaddingValue) 343 | let botConstraint = NSLayoutConstraint(item: pageControl, attribute: .bottom, relatedBy: .equal, toItem: self.view, attribute: .bottom, multiplier: 1.0, constant: 0.0) 344 | let widthConstraint = NSLayoutConstraint(item: pageControl, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1.0, constant: 40.0) 345 | currentPageControlConstraints = [topConstraint, leadingConstraint, botConstraint, widthConstraint] 346 | self.view.addConstraints(currentPageControlConstraints) 347 | pageControl.orientation = .Vertical 348 | break 349 | case .Right: 350 | let topConstraint = NSLayoutConstraint(item: pageControl, attribute: .top, relatedBy: .equal, toItem: self.view, attribute: .top, multiplier: 1.0, constant: 0.0) 351 | let botConstraint = NSLayoutConstraint(item: pageControl, attribute: .bottom, relatedBy: .equal, toItem: self.view, attribute: .bottom, multiplier: 1.0, constant: 0.0) 352 | let trailingConstraint = NSLayoutConstraint(item: pageControl, attribute: .trailing, relatedBy: .equal, toItem: self.view, attribute: .trailing, multiplier: 1.0, constant: -pageControlPaddingValue) 353 | let widthConstraint = NSLayoutConstraint(item: pageControl, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1.0, constant: 40.0) 354 | currentPageControlConstraints = [topConstraint, botConstraint, trailingConstraint, widthConstraint] 355 | self.view.addConstraints(currentPageControlConstraints) 356 | pageControl.orientation = .Vertical 357 | break 358 | } 359 | } 360 | 361 | 362 | // MARK: - UIVIEWCONTROLLER OVERRIDE 363 | required public init?(coder aDecoder: NSCoder) { 364 | super.init(coder: aDecoder) 365 | } 366 | 367 | override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { 368 | let bundle = Bundle(for: type(of: self)) 369 | let nib = "CMLazyScrollViewController" 370 | super.init(nibName: nib, bundle: bundle) 371 | } 372 | 373 | override public func didReceiveMemoryWarning() { 374 | super.didReceiveMemoryWarning() 375 | // Dispose of any resources that can be recreated. 376 | viewControllers.removeAll() 377 | views.removeAll() 378 | } 379 | 380 | override public func viewDidLoad() { 381 | super.viewDidLoad() 382 | pageControl.translatesAutoresizingMaskIntoConstraints = false 383 | } 384 | 385 | // MARK: - SCROLLVIEWDELEGATE 386 | public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 387 | if (currentIndex-2 >= 0) { 388 | clearSlot(index: currentIndex-2) 389 | } 390 | if (currentIndex+2 < numberOfViews-1) { 391 | clearSlot(index: currentIndex+2) 392 | } 393 | scrollDelegate?.scrollViewDidEndDecelerating?(scrollView) 394 | } 395 | 396 | public func scrollViewDidScroll(_ scrollView: UIScrollView) { 397 | let page = (scrollDirection == .Horizontal) ? (scrollView.contentOffset.x + (0.5 * pageSize.width)) / pageSize.width : (scrollView.contentOffset.y + (0.5 * pageSize.height)) / pageSize.height 398 | 399 | currentIndex = Int(page) 400 | pageControl.currentIndex = fixIndex(index: currentIndex) 401 | 402 | // last element, only for infinite mode 403 | if (infinite == true && scrollView.isTracking == false) { 404 | (scrollDirection == .Horizontal) ? checkDidScrollInfiniteModeWithX(scrollView: scrollView) : checkDidScrollInfiniteModeWithY(scrollView: scrollView) 405 | } 406 | 407 | lastScrollViewOffset = scrollView.contentOffset 408 | scrollDelegate?.scrollViewDidScroll?(scrollView) 409 | } 410 | 411 | public func scrollViewDidZoom(_ scrollView: UIScrollView) { 412 | scrollDelegate?.scrollViewDidZoom?(scrollView) 413 | } 414 | 415 | public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 416 | scrollDelegate?.scrollViewWillBeginDragging?(scrollView) 417 | } 418 | 419 | public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { 420 | if (isPagingEnable == true) { 421 | var index : CGFloat = CGFloat(currentIndex) 422 | // get the relative offset in the current page, x for horizontal and y for vertical mode 423 | let relativeOffset : CGFloat = (scrollDirection == .Horizontal) ? scrollView.contentOffset.x.truncatingRemainder(dividingBy: self.view.frame.width) : scrollView.contentOffset.y.truncatingRemainder(dividingBy: self.view.frame.height) 424 | // get the value we went compare the offset to width/2 or height/2 425 | let offsetValueToCompare : CGFloat = (scrollDirection == .Horizontal) ? (self.view.frame.width/2) : (self.view.frame.height/2) 426 | 427 | // we check if the velocity value is high enought to change page and if we didn't already change of page (with the relative offset) 428 | if ((velocity.x > Constants.velocityMaxSensibility || velocity.y > Constants.velocityMaxSensibility) && (relativeOffset < offsetValueToCompare)) { 429 | index += 1 430 | } else if (velocity.x < -Constants.velocityMaxSensibility || velocity.y < -Constants.velocityMaxSensibility && (relativeOffset > offsetValueToCompare)) { 431 | index -= 1 432 | } 433 | // set the target offset we want to go to 434 | targetContentOffset.pointee.x = (scrollDirection == .Horizontal) ? (index*pageSize.width) : 0 435 | targetContentOffset.pointee.y = (scrollDirection == .Horizontal) ? 0.0 : (pageSize.height*index) 436 | self.targetContentOffset = targetContentOffset.pointee 437 | } 438 | scrollDelegate?.scrollViewWillEndDragging?(scrollView, withVelocity: velocity, targetContentOffset: targetContentOffset) 439 | } 440 | 441 | public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { 442 | scrollDelegate?.scrollViewDidEndDragging?(scrollView, willDecelerate: decelerate) 443 | } 444 | 445 | public func scrollViewWillBeginDecelerating(_ scrollView: UIScrollView) { 446 | scrollDelegate?.scrollViewWillBeginDecelerating?(scrollView) 447 | } 448 | 449 | public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) { 450 | scrollDelegate?.scrollViewDidEndScrollingAnimation?(scrollView) 451 | } 452 | 453 | public func viewForZooming(in scrollView: UIScrollView) -> UIView? { 454 | return scrollDelegate?.viewForZooming?(in: scrollView) 455 | } 456 | 457 | public func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) { 458 | scrollDelegate?.scrollViewWillBeginZooming?(scrollView, with: view) 459 | } 460 | 461 | public func scrollViewDidEndZooming(_ scrollView: UIScrollView, with view: UIView?, atScale scale: CGFloat) { 462 | scrollDelegate?.scrollViewDidEndZooming?(scrollView, with: view, atScale: scale) 463 | } 464 | 465 | public func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool { 466 | if let bool = scrollDelegate?.scrollViewShouldScrollToTop?(scrollView) { 467 | return bool 468 | } 469 | return true 470 | } 471 | 472 | public func scrollViewDidScrollToTop(_ scrollView: UIScrollView) { 473 | scrollDelegate?.scrollViewDidScrollToTop?(scrollView) 474 | } 475 | 476 | public func screenDidRotate() { 477 | pageSize = view.frame.size 478 | let width = (scrollDirection == .Horizontal) ? CGFloat(numberOfViews)*pageSize.width : pageSize.width 479 | let height = (scrollDirection == .Horizontal) ? pageSize.height : CGFloat(numberOfViews)*pageSize.height 480 | scrollView.contentSize = CGSize(width: width, height: height) 481 | 482 | for view in views { 483 | if let view = view { 484 | let index : Int = view.tag 485 | let x : CGFloat = (scrollDirection == .Horizontal) ? CGFloat(index)*pageSize.width : 0.0 486 | let y : CGFloat = (scrollDirection == .Horizontal) ? 0.0 : CGFloat(index)*pageSize.height 487 | view.frame = CGRect(x: x, y: y, width: pageSize.width, height: pageSize.height) 488 | } 489 | } 490 | setCurrentPage(newValue: currentIndex, animated: false) 491 | } 492 | } 493 | 494 | -------------------------------------------------------------------------------- /Example/CMLazyScrollViewController.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 299AA8081DBA43FA0047F24E /* SwitchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 299AA8041DBA43FA0047F24E /* SwitchViewController.swift */; }; 11 | 299AA8091DBA43FA0047F24E /* SwitchViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8051DBA43FA0047F24E /* SwitchViewController.xib */; }; 12 | 299AA80A1DBA43FA0047F24E /* ImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 299AA8061DBA43FA0047F24E /* ImageViewController.swift */; }; 13 | 299AA80B1DBA43FA0047F24E /* ImageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8071DBA43FA0047F24E /* ImageViewController.xib */; }; 14 | 299AA80F1DBA44310047F24E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 299AA80D1DBA44310047F24E /* LaunchScreen.storyboard */; }; 15 | 299AA81D1DBA545D0047F24E /* animal1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8111DBA545D0047F24E /* animal1.jpg */; }; 16 | 299AA81E1DBA545D0047F24E /* animal2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8121DBA545D0047F24E /* animal2.jpg */; }; 17 | 299AA81F1DBA545D0047F24E /* animal3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8131DBA545D0047F24E /* animal3.jpg */; }; 18 | 299AA8201DBA545D0047F24E /* animal4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8141DBA545D0047F24E /* animal4.jpg */; }; 19 | 299AA8211DBA545D0047F24E /* cars1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8151DBA545D0047F24E /* cars1.jpg */; }; 20 | 299AA8221DBA545D0047F24E /* cars2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8161DBA545D0047F24E /* cars2.jpg */; }; 21 | 299AA8231DBA545D0047F24E /* cars3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8171DBA545D0047F24E /* cars3.jpg */; }; 22 | 299AA8241DBA545D0047F24E /* cars4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8181DBA545D0047F24E /* cars4.jpg */; }; 23 | 299AA8251DBA545D0047F24E /* deadpool1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8191DBA545D0047F24E /* deadpool1.jpg */; }; 24 | 299AA8261DBA545D0047F24E /* deadpool2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA81A1DBA545D0047F24E /* deadpool2.jpg */; }; 25 | 299AA8271DBA545D0047F24E /* deadpool3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA81B1DBA545D0047F24E /* deadpool3.jpg */; }; 26 | 299AA8281DBA545D0047F24E /* deadpool4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA81C1DBA545D0047F24E /* deadpool4.jpg */; }; 27 | 299AA82D1DBA59CE0047F24E /* pokemon1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA8291DBA59CE0047F24E /* pokemon1.jpg */; }; 28 | 299AA82E1DBA59CE0047F24E /* pokemon2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA82A1DBA59CE0047F24E /* pokemon2.jpg */; }; 29 | 299AA82F1DBA59CE0047F24E /* pokemon3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA82B1DBA59CE0047F24E /* pokemon3.jpg */; }; 30 | 299AA8301DBA59CE0047F24E /* pokemon4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 299AA82C1DBA59CE0047F24E /* pokemon4.jpg */; }; 31 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 32 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 33 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 34 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 35 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 36 | A899E46DFCF68EF863C00F8C /* Pods_CMLazyScrollViewController_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16A8642BEDB5148C1581351B /* Pods_CMLazyScrollViewController_Tests.framework */; }; 37 | C90460C813EF18E3139040E6 /* Pods_CMLazyScrollViewController_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB5C188BE650DC012FD894D /* Pods_CMLazyScrollViewController_Example.framework */; }; 38 | /* End PBXBuildFile section */ 39 | 40 | /* Begin PBXContainerItemProxy section */ 41 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 42 | isa = PBXContainerItemProxy; 43 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 44 | proxyType = 1; 45 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 46 | remoteInfo = CMLazyScrollViewController; 47 | }; 48 | /* End PBXContainerItemProxy section */ 49 | 50 | /* Begin PBXFileReference section */ 51 | 11EEFB89BC0212DF602A7E6D /* CMLazyScrollViewController.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CMLazyScrollViewController.podspec; path = ../CMLazyScrollViewController.podspec; sourceTree = ""; }; 52 | 16A8642BEDB5148C1581351B /* Pods_CMLazyScrollViewController_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CMLazyScrollViewController_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 18CF5337D1BEEF5BE99A7F68 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 54 | 299AA8041DBA43FA0047F24E /* SwitchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchViewController.swift; sourceTree = ""; }; 55 | 299AA8051DBA43FA0047F24E /* SwitchViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SwitchViewController.xib; sourceTree = ""; }; 56 | 299AA8061DBA43FA0047F24E /* ImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageViewController.swift; sourceTree = ""; }; 57 | 299AA8071DBA43FA0047F24E /* ImageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImageViewController.xib; sourceTree = ""; }; 58 | 299AA80E1DBA44310047F24E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 59 | 299AA8111DBA545D0047F24E /* animal1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = animal1.jpg; sourceTree = ""; }; 60 | 299AA8121DBA545D0047F24E /* animal2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = animal2.jpg; sourceTree = ""; }; 61 | 299AA8131DBA545D0047F24E /* animal3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = animal3.jpg; sourceTree = ""; }; 62 | 299AA8141DBA545D0047F24E /* animal4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = animal4.jpg; sourceTree = ""; }; 63 | 299AA8151DBA545D0047F24E /* cars1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cars1.jpg; sourceTree = ""; }; 64 | 299AA8161DBA545D0047F24E /* cars2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cars2.jpg; sourceTree = ""; }; 65 | 299AA8171DBA545D0047F24E /* cars3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cars3.jpg; sourceTree = ""; }; 66 | 299AA8181DBA545D0047F24E /* cars4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cars4.jpg; sourceTree = ""; }; 67 | 299AA8191DBA545D0047F24E /* deadpool1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = deadpool1.jpg; sourceTree = ""; }; 68 | 299AA81A1DBA545D0047F24E /* deadpool2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = deadpool2.jpg; sourceTree = ""; }; 69 | 299AA81B1DBA545D0047F24E /* deadpool3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = deadpool3.jpg; sourceTree = ""; }; 70 | 299AA81C1DBA545D0047F24E /* deadpool4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = deadpool4.jpg; sourceTree = ""; }; 71 | 299AA8291DBA59CE0047F24E /* pokemon1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pokemon1.jpg; sourceTree = ""; }; 72 | 299AA82A1DBA59CE0047F24E /* pokemon2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pokemon2.jpg; sourceTree = ""; }; 73 | 299AA82B1DBA59CE0047F24E /* pokemon3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pokemon3.jpg; sourceTree = ""; }; 74 | 299AA82C1DBA59CE0047F24E /* pokemon4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = pokemon4.jpg; sourceTree = ""; }; 75 | 3632A7B0DDDCBCFED92255D9 /* Pods-CMLazyScrollViewController_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMLazyScrollViewController_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example.release.xcconfig"; sourceTree = ""; }; 76 | 607FACD01AFB9204008FA782 /* CMLazyScrollViewController_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CMLazyScrollViewController_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 79 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 80 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 81 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 82 | 607FACE51AFB9204008FA782 /* CMLazyScrollViewController_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CMLazyScrollViewController_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 85 | B3A8E4C3090A69DF41852EF8 /* Pods-CMLazyScrollViewController_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMLazyScrollViewController_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests.debug.xcconfig"; sourceTree = ""; }; 86 | B4886CF77D67ED3B74F8DCBF /* Pods-CMLazyScrollViewController_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMLazyScrollViewController_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests.release.xcconfig"; sourceTree = ""; }; 87 | B5B3946EFD7C6B836605D5A4 /* Pods-CMLazyScrollViewController_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CMLazyScrollViewController_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example.debug.xcconfig"; sourceTree = ""; }; 88 | E1FD9DC4CF0467046387FD8C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 89 | EDB5C188BE650DC012FD894D /* Pods_CMLazyScrollViewController_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CMLazyScrollViewController_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 90 | /* End PBXFileReference section */ 91 | 92 | /* Begin PBXFrameworksBuildPhase section */ 93 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | C90460C813EF18E3139040E6 /* Pods_CMLazyScrollViewController_Example.framework in Frameworks */, 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | A899E46DFCF68EF863C00F8C /* Pods_CMLazyScrollViewController_Tests.framework in Frameworks */, 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXFrameworksBuildPhase section */ 110 | 111 | /* Begin PBXGroup section */ 112 | 1658C8D0A2953E3CF28C3B78 /* Pods */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | B5B3946EFD7C6B836605D5A4 /* Pods-CMLazyScrollViewController_Example.debug.xcconfig */, 116 | 3632A7B0DDDCBCFED92255D9 /* Pods-CMLazyScrollViewController_Example.release.xcconfig */, 117 | B3A8E4C3090A69DF41852EF8 /* Pods-CMLazyScrollViewController_Tests.debug.xcconfig */, 118 | B4886CF77D67ED3B74F8DCBF /* Pods-CMLazyScrollViewController_Tests.release.xcconfig */, 119 | ); 120 | name = Pods; 121 | sourceTree = ""; 122 | }; 123 | 299AA80C1DBA43FD0047F24E /* ViewControllers */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 299AA8041DBA43FA0047F24E /* SwitchViewController.swift */, 127 | 299AA8051DBA43FA0047F24E /* SwitchViewController.xib */, 128 | 299AA8061DBA43FA0047F24E /* ImageViewController.swift */, 129 | 299AA8071DBA43FA0047F24E /* ImageViewController.xib */, 130 | ); 131 | name = ViewControllers; 132 | sourceTree = ""; 133 | }; 134 | 299AA8101DBA54500047F24E /* images */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 299AA8291DBA59CE0047F24E /* pokemon1.jpg */, 138 | 299AA82A1DBA59CE0047F24E /* pokemon2.jpg */, 139 | 299AA82B1DBA59CE0047F24E /* pokemon3.jpg */, 140 | 299AA82C1DBA59CE0047F24E /* pokemon4.jpg */, 141 | 299AA8111DBA545D0047F24E /* animal1.jpg */, 142 | 299AA8121DBA545D0047F24E /* animal2.jpg */, 143 | 299AA8131DBA545D0047F24E /* animal3.jpg */, 144 | 299AA8141DBA545D0047F24E /* animal4.jpg */, 145 | 299AA8151DBA545D0047F24E /* cars1.jpg */, 146 | 299AA8161DBA545D0047F24E /* cars2.jpg */, 147 | 299AA8171DBA545D0047F24E /* cars3.jpg */, 148 | 299AA8181DBA545D0047F24E /* cars4.jpg */, 149 | 299AA8191DBA545D0047F24E /* deadpool1.jpg */, 150 | 299AA81A1DBA545D0047F24E /* deadpool2.jpg */, 151 | 299AA81B1DBA545D0047F24E /* deadpool3.jpg */, 152 | 299AA81C1DBA545D0047F24E /* deadpool4.jpg */, 153 | ); 154 | name = images; 155 | sourceTree = ""; 156 | }; 157 | 607FACC71AFB9204008FA782 = { 158 | isa = PBXGroup; 159 | children = ( 160 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 161 | 607FACD21AFB9204008FA782 /* Example for CMLazyScrollViewController */, 162 | 607FACE81AFB9204008FA782 /* Tests */, 163 | 607FACD11AFB9204008FA782 /* Products */, 164 | 1658C8D0A2953E3CF28C3B78 /* Pods */, 165 | A52BA86D34F5583A72B9F225 /* Frameworks */, 166 | ); 167 | sourceTree = ""; 168 | }; 169 | 607FACD11AFB9204008FA782 /* Products */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 607FACD01AFB9204008FA782 /* CMLazyScrollViewController_Example.app */, 173 | 607FACE51AFB9204008FA782 /* CMLazyScrollViewController_Tests.xctest */, 174 | ); 175 | name = Products; 176 | sourceTree = ""; 177 | }; 178 | 607FACD21AFB9204008FA782 /* Example for CMLazyScrollViewController */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 299AA8101DBA54500047F24E /* images */, 182 | 299AA80D1DBA44310047F24E /* LaunchScreen.storyboard */, 183 | 299AA80C1DBA43FD0047F24E /* ViewControllers */, 184 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 185 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 186 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 187 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 188 | 607FACD31AFB9204008FA782 /* Supporting Files */, 189 | ); 190 | name = "Example for CMLazyScrollViewController"; 191 | path = CMLazyScrollViewController; 192 | sourceTree = ""; 193 | }; 194 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 607FACD41AFB9204008FA782 /* Info.plist */, 198 | ); 199 | name = "Supporting Files"; 200 | sourceTree = ""; 201 | }; 202 | 607FACE81AFB9204008FA782 /* Tests */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 206 | 607FACE91AFB9204008FA782 /* Supporting Files */, 207 | ); 208 | path = Tests; 209 | sourceTree = ""; 210 | }; 211 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 607FACEA1AFB9204008FA782 /* Info.plist */, 215 | ); 216 | name = "Supporting Files"; 217 | sourceTree = ""; 218 | }; 219 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 11EEFB89BC0212DF602A7E6D /* CMLazyScrollViewController.podspec */, 223 | E1FD9DC4CF0467046387FD8C /* README.md */, 224 | 18CF5337D1BEEF5BE99A7F68 /* LICENSE */, 225 | ); 226 | name = "Podspec Metadata"; 227 | sourceTree = ""; 228 | }; 229 | A52BA86D34F5583A72B9F225 /* Frameworks */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | EDB5C188BE650DC012FD894D /* Pods_CMLazyScrollViewController_Example.framework */, 233 | 16A8642BEDB5148C1581351B /* Pods_CMLazyScrollViewController_Tests.framework */, 234 | ); 235 | name = Frameworks; 236 | sourceTree = ""; 237 | }; 238 | /* End PBXGroup section */ 239 | 240 | /* Begin PBXNativeTarget section */ 241 | 607FACCF1AFB9204008FA782 /* CMLazyScrollViewController_Example */ = { 242 | isa = PBXNativeTarget; 243 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CMLazyScrollViewController_Example" */; 244 | buildPhases = ( 245 | 112ABE90F1C074ED1615122C /* [CP] Check Pods Manifest.lock */, 246 | 607FACCC1AFB9204008FA782 /* Sources */, 247 | 607FACCD1AFB9204008FA782 /* Frameworks */, 248 | 607FACCE1AFB9204008FA782 /* Resources */, 249 | FE3458D00D1F82B3844EAD32 /* [CP] Embed Pods Frameworks */, 250 | 21199C6982A127E4FE74CE11 /* [CP] Copy Pods Resources */, 251 | ); 252 | buildRules = ( 253 | ); 254 | dependencies = ( 255 | ); 256 | name = CMLazyScrollViewController_Example; 257 | productName = CMLazyScrollViewController; 258 | productReference = 607FACD01AFB9204008FA782 /* CMLazyScrollViewController_Example.app */; 259 | productType = "com.apple.product-type.application"; 260 | }; 261 | 607FACE41AFB9204008FA782 /* CMLazyScrollViewController_Tests */ = { 262 | isa = PBXNativeTarget; 263 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CMLazyScrollViewController_Tests" */; 264 | buildPhases = ( 265 | 163115923469C91E9CCA2F8D /* [CP] Check Pods Manifest.lock */, 266 | 607FACE11AFB9204008FA782 /* Sources */, 267 | 607FACE21AFB9204008FA782 /* Frameworks */, 268 | 607FACE31AFB9204008FA782 /* Resources */, 269 | BF1D8D43C0FDF60B4FC87C6B /* [CP] Embed Pods Frameworks */, 270 | A65FB4D1D9CBBF733BE1690E /* [CP] Copy Pods Resources */, 271 | ); 272 | buildRules = ( 273 | ); 274 | dependencies = ( 275 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 276 | ); 277 | name = CMLazyScrollViewController_Tests; 278 | productName = Tests; 279 | productReference = 607FACE51AFB9204008FA782 /* CMLazyScrollViewController_Tests.xctest */; 280 | productType = "com.apple.product-type.bundle.unit-test"; 281 | }; 282 | /* End PBXNativeTarget section */ 283 | 284 | /* Begin PBXProject section */ 285 | 607FACC81AFB9204008FA782 /* Project object */ = { 286 | isa = PBXProject; 287 | attributes = { 288 | LastSwiftUpdateCheck = 0720; 289 | LastUpgradeCheck = 0800; 290 | ORGANIZATIONNAME = CocoaPods; 291 | TargetAttributes = { 292 | 607FACCF1AFB9204008FA782 = { 293 | CreatedOnToolsVersion = 6.3.1; 294 | DevelopmentTeam = 7NZQAU7QJW; 295 | LastSwiftMigration = 0800; 296 | }; 297 | 607FACE41AFB9204008FA782 = { 298 | CreatedOnToolsVersion = 6.3.1; 299 | DevelopmentTeam = 7NZQAU7QJW; 300 | LastSwiftMigration = 0800; 301 | TestTargetID = 607FACCF1AFB9204008FA782; 302 | }; 303 | }; 304 | }; 305 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "CMLazyScrollViewController" */; 306 | compatibilityVersion = "Xcode 3.2"; 307 | developmentRegion = English; 308 | hasScannedForEncodings = 0; 309 | knownRegions = ( 310 | en, 311 | Base, 312 | ); 313 | mainGroup = 607FACC71AFB9204008FA782; 314 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 315 | projectDirPath = ""; 316 | projectRoot = ""; 317 | targets = ( 318 | 607FACCF1AFB9204008FA782 /* CMLazyScrollViewController_Example */, 319 | 607FACE41AFB9204008FA782 /* CMLazyScrollViewController_Tests */, 320 | ); 321 | }; 322 | /* End PBXProject section */ 323 | 324 | /* Begin PBXResourcesBuildPhase section */ 325 | 607FACCE1AFB9204008FA782 /* Resources */ = { 326 | isa = PBXResourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | 299AA82E1DBA59CE0047F24E /* pokemon2.jpg in Resources */, 330 | 299AA8241DBA545D0047F24E /* cars4.jpg in Resources */, 331 | 299AA8221DBA545D0047F24E /* cars2.jpg in Resources */, 332 | 299AA80B1DBA43FA0047F24E /* ImageViewController.xib in Resources */, 333 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 334 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 335 | 299AA8231DBA545D0047F24E /* cars3.jpg in Resources */, 336 | 299AA81E1DBA545D0047F24E /* animal2.jpg in Resources */, 337 | 299AA8271DBA545D0047F24E /* deadpool3.jpg in Resources */, 338 | 299AA8301DBA59CE0047F24E /* pokemon4.jpg in Resources */, 339 | 299AA80F1DBA44310047F24E /* LaunchScreen.storyboard in Resources */, 340 | 299AA8091DBA43FA0047F24E /* SwitchViewController.xib in Resources */, 341 | 299AA8261DBA545D0047F24E /* deadpool2.jpg in Resources */, 342 | 299AA81D1DBA545D0047F24E /* animal1.jpg in Resources */, 343 | 299AA81F1DBA545D0047F24E /* animal3.jpg in Resources */, 344 | 299AA8281DBA545D0047F24E /* deadpool4.jpg in Resources */, 345 | 299AA8251DBA545D0047F24E /* deadpool1.jpg in Resources */, 346 | 299AA82D1DBA59CE0047F24E /* pokemon1.jpg in Resources */, 347 | 299AA8211DBA545D0047F24E /* cars1.jpg in Resources */, 348 | 299AA8201DBA545D0047F24E /* animal4.jpg in Resources */, 349 | 299AA82F1DBA59CE0047F24E /* pokemon3.jpg in Resources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | 607FACE31AFB9204008FA782 /* Resources */ = { 354 | isa = PBXResourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | }; 360 | /* End PBXResourcesBuildPhase section */ 361 | 362 | /* Begin PBXShellScriptBuildPhase section */ 363 | 112ABE90F1C074ED1615122C /* [CP] Check Pods Manifest.lock */ = { 364 | isa = PBXShellScriptBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | ); 368 | inputPaths = ( 369 | ); 370 | name = "[CP] Check Pods Manifest.lock"; 371 | outputPaths = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | shellPath = /bin/sh; 375 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 376 | showEnvVarsInLog = 0; 377 | }; 378 | 163115923469C91E9CCA2F8D /* [CP] Check Pods Manifest.lock */ = { 379 | isa = PBXShellScriptBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | ); 383 | inputPaths = ( 384 | ); 385 | name = "[CP] Check Pods Manifest.lock"; 386 | outputPaths = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | shellPath = /bin/sh; 390 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 391 | showEnvVarsInLog = 0; 392 | }; 393 | 21199C6982A127E4FE74CE11 /* [CP] Copy Pods Resources */ = { 394 | isa = PBXShellScriptBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | ); 398 | inputPaths = ( 399 | ); 400 | name = "[CP] Copy Pods Resources"; 401 | outputPaths = ( 402 | ); 403 | runOnlyForDeploymentPostprocessing = 0; 404 | shellPath = /bin/sh; 405 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-resources.sh\"\n"; 406 | showEnvVarsInLog = 0; 407 | }; 408 | A65FB4D1D9CBBF733BE1690E /* [CP] Copy Pods Resources */ = { 409 | isa = PBXShellScriptBuildPhase; 410 | buildActionMask = 2147483647; 411 | files = ( 412 | ); 413 | inputPaths = ( 414 | ); 415 | name = "[CP] Copy Pods Resources"; 416 | outputPaths = ( 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | shellPath = /bin/sh; 420 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-resources.sh\"\n"; 421 | showEnvVarsInLog = 0; 422 | }; 423 | BF1D8D43C0FDF60B4FC87C6B /* [CP] Embed Pods Frameworks */ = { 424 | isa = PBXShellScriptBuildPhase; 425 | buildActionMask = 2147483647; 426 | files = ( 427 | ); 428 | inputPaths = ( 429 | ); 430 | name = "[CP] Embed Pods Frameworks"; 431 | outputPaths = ( 432 | ); 433 | runOnlyForDeploymentPostprocessing = 0; 434 | shellPath = /bin/sh; 435 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CMLazyScrollViewController_Tests/Pods-CMLazyScrollViewController_Tests-frameworks.sh\"\n"; 436 | showEnvVarsInLog = 0; 437 | }; 438 | FE3458D00D1F82B3844EAD32 /* [CP] Embed Pods Frameworks */ = { 439 | isa = PBXShellScriptBuildPhase; 440 | buildActionMask = 2147483647; 441 | files = ( 442 | ); 443 | inputPaths = ( 444 | ); 445 | name = "[CP] Embed Pods Frameworks"; 446 | outputPaths = ( 447 | ); 448 | runOnlyForDeploymentPostprocessing = 0; 449 | shellPath = /bin/sh; 450 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CMLazyScrollViewController_Example/Pods-CMLazyScrollViewController_Example-frameworks.sh\"\n"; 451 | showEnvVarsInLog = 0; 452 | }; 453 | /* End PBXShellScriptBuildPhase section */ 454 | 455 | /* Begin PBXSourcesBuildPhase section */ 456 | 607FACCC1AFB9204008FA782 /* Sources */ = { 457 | isa = PBXSourcesBuildPhase; 458 | buildActionMask = 2147483647; 459 | files = ( 460 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 461 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 462 | 299AA80A1DBA43FA0047F24E /* ImageViewController.swift in Sources */, 463 | 299AA8081DBA43FA0047F24E /* SwitchViewController.swift in Sources */, 464 | ); 465 | runOnlyForDeploymentPostprocessing = 0; 466 | }; 467 | 607FACE11AFB9204008FA782 /* Sources */ = { 468 | isa = PBXSourcesBuildPhase; 469 | buildActionMask = 2147483647; 470 | files = ( 471 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 472 | ); 473 | runOnlyForDeploymentPostprocessing = 0; 474 | }; 475 | /* End PBXSourcesBuildPhase section */ 476 | 477 | /* Begin PBXTargetDependency section */ 478 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 479 | isa = PBXTargetDependency; 480 | target = 607FACCF1AFB9204008FA782 /* CMLazyScrollViewController_Example */; 481 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 482 | }; 483 | /* End PBXTargetDependency section */ 484 | 485 | /* Begin PBXVariantGroup section */ 486 | 299AA80D1DBA44310047F24E /* LaunchScreen.storyboard */ = { 487 | isa = PBXVariantGroup; 488 | children = ( 489 | 299AA80E1DBA44310047F24E /* Base */, 490 | ); 491 | name = LaunchScreen.storyboard; 492 | sourceTree = ""; 493 | }; 494 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 495 | isa = PBXVariantGroup; 496 | children = ( 497 | 607FACDA1AFB9204008FA782 /* Base */, 498 | ); 499 | name = Main.storyboard; 500 | sourceTree = ""; 501 | }; 502 | /* End PBXVariantGroup section */ 503 | 504 | /* Begin XCBuildConfiguration section */ 505 | 607FACED1AFB9204008FA782 /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | ALWAYS_SEARCH_USER_PATHS = NO; 509 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_ENABLE_MODULES = YES; 512 | CLANG_ENABLE_OBJC_ARC = YES; 513 | CLANG_WARN_BOOL_CONVERSION = YES; 514 | CLANG_WARN_CONSTANT_CONVERSION = YES; 515 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 516 | CLANG_WARN_EMPTY_BODY = YES; 517 | CLANG_WARN_ENUM_CONVERSION = YES; 518 | CLANG_WARN_INFINITE_RECURSION = YES; 519 | CLANG_WARN_INT_CONVERSION = YES; 520 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 521 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 522 | CLANG_WARN_UNREACHABLE_CODE = YES; 523 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 524 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 525 | COPY_PHASE_STRIP = NO; 526 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 527 | ENABLE_STRICT_OBJC_MSGSEND = YES; 528 | ENABLE_TESTABILITY = YES; 529 | GCC_C_LANGUAGE_STANDARD = gnu99; 530 | GCC_DYNAMIC_NO_PIC = NO; 531 | GCC_NO_COMMON_BLOCKS = YES; 532 | GCC_OPTIMIZATION_LEVEL = 0; 533 | GCC_PREPROCESSOR_DEFINITIONS = ( 534 | "DEBUG=1", 535 | "$(inherited)", 536 | ); 537 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 538 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 539 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 540 | GCC_WARN_UNDECLARED_SELECTOR = YES; 541 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 542 | GCC_WARN_UNUSED_FUNCTION = YES; 543 | GCC_WARN_UNUSED_VARIABLE = YES; 544 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 545 | MTL_ENABLE_DEBUG_INFO = YES; 546 | ONLY_ACTIVE_ARCH = YES; 547 | SDKROOT = iphoneos; 548 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 549 | }; 550 | name = Debug; 551 | }; 552 | 607FACEE1AFB9204008FA782 /* Release */ = { 553 | isa = XCBuildConfiguration; 554 | buildSettings = { 555 | ALWAYS_SEARCH_USER_PATHS = NO; 556 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 557 | CLANG_CXX_LIBRARY = "libc++"; 558 | CLANG_ENABLE_MODULES = YES; 559 | CLANG_ENABLE_OBJC_ARC = YES; 560 | CLANG_WARN_BOOL_CONVERSION = YES; 561 | CLANG_WARN_CONSTANT_CONVERSION = YES; 562 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 563 | CLANG_WARN_EMPTY_BODY = YES; 564 | CLANG_WARN_ENUM_CONVERSION = YES; 565 | CLANG_WARN_INFINITE_RECURSION = YES; 566 | CLANG_WARN_INT_CONVERSION = YES; 567 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 568 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 569 | CLANG_WARN_UNREACHABLE_CODE = YES; 570 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 571 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 572 | COPY_PHASE_STRIP = NO; 573 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 574 | ENABLE_NS_ASSERTIONS = NO; 575 | ENABLE_STRICT_OBJC_MSGSEND = YES; 576 | GCC_C_LANGUAGE_STANDARD = gnu99; 577 | GCC_NO_COMMON_BLOCKS = YES; 578 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 579 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 580 | GCC_WARN_UNDECLARED_SELECTOR = YES; 581 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 582 | GCC_WARN_UNUSED_FUNCTION = YES; 583 | GCC_WARN_UNUSED_VARIABLE = YES; 584 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 585 | MTL_ENABLE_DEBUG_INFO = NO; 586 | SDKROOT = iphoneos; 587 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 588 | VALIDATE_PRODUCT = YES; 589 | }; 590 | name = Release; 591 | }; 592 | 607FACF01AFB9204008FA782 /* Debug */ = { 593 | isa = XCBuildConfiguration; 594 | baseConfigurationReference = B5B3946EFD7C6B836605D5A4 /* Pods-CMLazyScrollViewController_Example.debug.xcconfig */; 595 | buildSettings = { 596 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 597 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 598 | DEVELOPMENT_TEAM = 7NZQAU7QJW; 599 | INFOPLIST_FILE = CMLazyScrollViewController/Info.plist; 600 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 601 | MODULE_NAME = ExampleApp; 602 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 603 | PRODUCT_NAME = "$(TARGET_NAME)"; 604 | SWIFT_VERSION = 3.0; 605 | }; 606 | name = Debug; 607 | }; 608 | 607FACF11AFB9204008FA782 /* Release */ = { 609 | isa = XCBuildConfiguration; 610 | baseConfigurationReference = 3632A7B0DDDCBCFED92255D9 /* Pods-CMLazyScrollViewController_Example.release.xcconfig */; 611 | buildSettings = { 612 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 613 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 614 | DEVELOPMENT_TEAM = 7NZQAU7QJW; 615 | INFOPLIST_FILE = CMLazyScrollViewController/Info.plist; 616 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 617 | MODULE_NAME = ExampleApp; 618 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 619 | PRODUCT_NAME = "$(TARGET_NAME)"; 620 | SWIFT_VERSION = 3.0; 621 | }; 622 | name = Release; 623 | }; 624 | 607FACF31AFB9204008FA782 /* Debug */ = { 625 | isa = XCBuildConfiguration; 626 | baseConfigurationReference = B3A8E4C3090A69DF41852EF8 /* Pods-CMLazyScrollViewController_Tests.debug.xcconfig */; 627 | buildSettings = { 628 | DEVELOPMENT_TEAM = 7NZQAU7QJW; 629 | FRAMEWORK_SEARCH_PATHS = ( 630 | "$(SDKROOT)/Developer/Library/Frameworks", 631 | "$(inherited)", 632 | ); 633 | GCC_PREPROCESSOR_DEFINITIONS = ( 634 | "DEBUG=1", 635 | "$(inherited)", 636 | ); 637 | INFOPLIST_FILE = Tests/Info.plist; 638 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 639 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 640 | PRODUCT_NAME = "$(TARGET_NAME)"; 641 | SWIFT_VERSION = 3.0; 642 | }; 643 | name = Debug; 644 | }; 645 | 607FACF41AFB9204008FA782 /* Release */ = { 646 | isa = XCBuildConfiguration; 647 | baseConfigurationReference = B4886CF77D67ED3B74F8DCBF /* Pods-CMLazyScrollViewController_Tests.release.xcconfig */; 648 | buildSettings = { 649 | DEVELOPMENT_TEAM = 7NZQAU7QJW; 650 | FRAMEWORK_SEARCH_PATHS = ( 651 | "$(SDKROOT)/Developer/Library/Frameworks", 652 | "$(inherited)", 653 | ); 654 | INFOPLIST_FILE = Tests/Info.plist; 655 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 656 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 657 | PRODUCT_NAME = "$(TARGET_NAME)"; 658 | SWIFT_VERSION = 3.0; 659 | }; 660 | name = Release; 661 | }; 662 | /* End XCBuildConfiguration section */ 663 | 664 | /* Begin XCConfigurationList section */ 665 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "CMLazyScrollViewController" */ = { 666 | isa = XCConfigurationList; 667 | buildConfigurations = ( 668 | 607FACED1AFB9204008FA782 /* Debug */, 669 | 607FACEE1AFB9204008FA782 /* Release */, 670 | ); 671 | defaultConfigurationIsVisible = 0; 672 | defaultConfigurationName = Release; 673 | }; 674 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CMLazyScrollViewController_Example" */ = { 675 | isa = XCConfigurationList; 676 | buildConfigurations = ( 677 | 607FACF01AFB9204008FA782 /* Debug */, 678 | 607FACF11AFB9204008FA782 /* Release */, 679 | ); 680 | defaultConfigurationIsVisible = 0; 681 | defaultConfigurationName = Release; 682 | }; 683 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CMLazyScrollViewController_Tests" */ = { 684 | isa = XCConfigurationList; 685 | buildConfigurations = ( 686 | 607FACF31AFB9204008FA782 /* Debug */, 687 | 607FACF41AFB9204008FA782 /* Release */, 688 | ); 689 | defaultConfigurationIsVisible = 0; 690 | defaultConfigurationName = Release; 691 | }; 692 | /* End XCConfigurationList section */ 693 | }; 694 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 695 | } 696 | --------------------------------------------------------------------------------