├── Examples ├── Example2 │ ├── Example2 │ │ ├── Assets.xcassets │ │ │ ├── Contents.json │ │ │ ├── puppy1.imageset │ │ │ │ ├── puppy1.jpg │ │ │ │ └── Contents.json │ │ │ ├── puppy2.imageset │ │ │ │ ├── puppy2.jpg │ │ │ │ └── Contents.json │ │ │ ├── puppy3.imageset │ │ │ │ ├── puppy3.jpg │ │ │ │ └── Contents.json │ │ │ ├── puppy4.imageset │ │ │ │ ├── puppy4.jpg │ │ │ │ └── Contents.json │ │ │ ├── puppy5.imageset │ │ │ │ ├── puppy5.jpg │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ ├── AppDelegate.swift │ │ └── ViewController.swift │ ├── Pods │ │ ├── Target Support Files │ │ │ ├── SwiftCarousel │ │ │ │ ├── SwiftCarousel-prefix.pch │ │ │ │ ├── SwiftCarousel.modulemap │ │ │ │ ├── SwiftCarousel-dummy.m │ │ │ │ ├── SwiftCarousel-umbrella.h │ │ │ │ ├── SwiftCarousel.xcconfig │ │ │ │ └── Info.plist │ │ │ └── Pods-Example2 │ │ │ │ ├── Pods-Example2.modulemap │ │ │ │ ├── Pods-Example2-dummy.m │ │ │ │ ├── Pods-Example2-umbrella.h │ │ │ │ ├── Pods-Example2.debug.xcconfig │ │ │ │ ├── Pods-Example2.release.xcconfig │ │ │ │ ├── Info.plist │ │ │ │ ├── Pods-Example2-acknowledgements.markdown │ │ │ │ ├── Pods-Example2-acknowledgements.plist │ │ │ │ ├── Pods-Example2-frameworks.sh │ │ │ │ └── Pods-Example2-resources.sh │ │ ├── Manifest.lock │ │ └── Local Podspecs │ │ │ └── SwiftCarousel.podspec.json │ ├── Example2.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── project.pbxproj │ ├── Example2.xcworkspace │ │ └── contents.xcworkspacedata │ ├── Podfile.lock │ └── Podfile └── Example1 │ ├── Pods │ ├── Target Support Files │ │ ├── SwiftCarousel │ │ │ ├── SwiftCarousel-prefix.pch │ │ │ ├── SwiftCarousel.modulemap │ │ │ ├── SwiftCarousel-dummy.m │ │ │ ├── SwiftCarousel-umbrella.h │ │ │ ├── SwiftCarousel.xcconfig │ │ │ └── Info.plist │ │ └── Pods-Example1 │ │ │ ├── Pods-Example1.modulemap │ │ │ ├── Pods-Example1-dummy.m │ │ │ ├── Pods-Example1-umbrella.h │ │ │ ├── Pods-Example1.debug.xcconfig │ │ │ ├── Pods-Example1.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-Example1-acknowledgements.markdown │ │ │ ├── Pods-Example1-acknowledgements.plist │ │ │ ├── Pods-Example1-frameworks.sh │ │ │ └── Pods-Example1-resources.sh │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── SwiftCarousel.podspec.json │ └── Pods.xcodeproj │ │ └── project.pbxproj │ ├── .build │ └── debug │ │ └── SwiftCarousel.o │ │ ├── build.db │ │ ├── SwiftCarousel │ │ ├── master.swiftdeps │ │ ├── output-file-map.json │ │ ├── SwiftCarousel.d │ │ └── SwiftCarousel.swiftdeps │ │ └── llbuild.yaml │ ├── Example1.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj │ ├── Example1.xcworkspace │ └── contents.xcworkspacedata │ ├── Podfile.lock │ ├── Podfile │ └── Example1 │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── AppDelegate.swift │ └── ViewController.swift ├── Source ├── SwiftCarouselError.swift ├── SwiftCarousel+UIGestureRecognizerDelegate.swift ├── SwiftCarouselScroll.swift ├── UIView+SwiftCarousel.swift ├── SwiftCarouselResizeType.swift ├── SwiftCarouselDelegate.swift ├── SwiftCarousel+UIScrollViewDelegate.swift └── SwiftCarousel.swift ├── .travis.yml ├── .gitignore ├── SwiftCarousel.podspec ├── LICENSE ├── Changelog.md └── README.md /Examples/Example2/Example2/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/build.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example1/.build/debug/SwiftCarousel.o/build.db -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy1.imageset/puppy1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example2/Example2/Assets.xcassets/puppy1.imageset/puppy1.jpg -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy2.imageset/puppy2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example2/Example2/Assets.xcassets/puppy2.imageset/puppy2.jpg -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy3.imageset/puppy3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example2/Example2/Assets.xcassets/puppy3.imageset/puppy3.jpg -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy4.imageset/puppy4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example2/Example2/Assets.xcassets/puppy4.imageset/puppy4.jpg -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy5.imageset/puppy5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DroidsOnRoids/SwiftCarousel/HEAD/Examples/Example2/Example2/Assets.xcassets/puppy5.imageset/puppy5.jpg -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Example1 { 2 | umbrella header "Pods-Example1-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/SwiftCarousel.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftCarousel { 2 | umbrella header "SwiftCarousel-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Example2 { 2 | umbrella header "Pods-Example2-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/SwiftCarousel.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftCarousel { 2 | umbrella header "SwiftCarousel-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Example1 : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Example1 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftCarousel : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftCarousel 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Example2 : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Example2 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftCarousel : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftCarousel 5 | @end 6 | -------------------------------------------------------------------------------- /Examples/Example1/Example1.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Example2/Example2.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_Example1VersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_Example1VersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double SwiftCarouselVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char SwiftCarouselVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_Example2VersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_Example2VersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/SwiftCarousel-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double SwiftCarouselVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char SwiftCarouselVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Examples/Example1/Example1.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/Example2/Example2.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/master.swiftdeps: -------------------------------------------------------------------------------- 1 | version: "Apple Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f82939c)" 2 | options: "55c77f6966cfe4b4ad3ea1fcc0c222b5" 3 | build_time: [503077838, 672971000] 4 | inputs: 5 | "/Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift": !private [503077836, 0] 6 | -------------------------------------------------------------------------------- /Examples/Example1/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftCarousel (0.8.0) 3 | 4 | DEPENDENCIES: 5 | - SwiftCarousel (from `../../`) 6 | 7 | EXTERNAL SOURCES: 8 | SwiftCarousel: 9 | :path: "../../" 10 | 11 | SPEC CHECKSUMS: 12 | SwiftCarousel: c9c3d4f2ca36f579c76cfd904ad03432ddb64983 13 | 14 | PODFILE CHECKSUM: 2e485fbec3d05496b4e659ad32988f1f1131acda 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Examples/Example2/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftCarousel (0.8.0) 3 | 4 | DEPENDENCIES: 5 | - SwiftCarousel (from `../../`) 6 | 7 | EXTERNAL SOURCES: 8 | SwiftCarousel: 9 | :path: "../../" 10 | 11 | SPEC CHECKSUMS: 12 | SwiftCarousel: c9c3d4f2ca36f579c76cfd904ad03432ddb64983 13 | 14 | PODFILE CHECKSUM: f8d4064eb80117a773d76972667a2590e3f3b78b 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftCarousel (0.8.0) 3 | 4 | DEPENDENCIES: 5 | - SwiftCarousel (from `../../`) 6 | 7 | EXTERNAL SOURCES: 8 | SwiftCarousel: 9 | :path: "../../" 10 | 11 | SPEC CHECKSUMS: 12 | SwiftCarousel: c9c3d4f2ca36f579c76cfd904ad03432ddb64983 13 | 14 | PODFILE CHECKSUM: 2e485fbec3d05496b4e659ad32988f1f1131acda 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftCarousel (0.8.0) 3 | 4 | DEPENDENCIES: 5 | - SwiftCarousel (from `../../`) 6 | 7 | EXTERNAL SOURCES: 8 | SwiftCarousel: 9 | :path: "../../" 10 | 11 | SPEC CHECKSUMS: 12 | SwiftCarousel: c9c3d4f2ca36f579c76cfd904ad03432ddb64983 13 | 14 | PODFILE CHECKSUM: f8d4064eb80117a773d76972667a2590e3f3b78b 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "puppy1.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "puppy2.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "puppy3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "puppy4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.xcassets/puppy5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "puppy5.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Examples/Example1/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'Example1' do 4 | pod 'SwiftCarousel', :path => "../../" 5 | end 6 | 7 | post_install do |installer| 8 | installer.pods_project.targets.each do |target| 9 | target.build_configurations.each do |config| 10 | if config.name == 'Debug' 11 | config.build_settings['ENABLE_TESTABILITY'] = 'YES' 12 | config.build_settings['SWIFT_VERSION'] = '3.0' 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Examples/Example2/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'Example2' do 4 | pod 'SwiftCarousel', :path => "../../" 5 | end 6 | 7 | post_install do |installer| 8 | installer.pods_project.targets.each do |target| 9 | target.build_configurations.each do |config| 10 | if config.name == 'Debug' 11 | config.build_settings['ENABLE_TESTABILITY'] = 'YES' 12 | config.build_settings['SWIFT_VERSION'] = '3.0' 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /Source/SwiftCarouselError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftCarouselError.swift 3 | // Pods 4 | // 5 | // Created by Ignacio Rodrigo on 3/20/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | 11 | // ErrorType enum for the potential errors thrown by SwiftCarousel 12 | enum SwiftCarouselError: Error { 13 | case viewAlreadyAdded // thrown when returning a view that has already been added to the carousel previously from the item factory closure 14 | // TODO: Add BadNumberOfItems, when using selectItem or scrollType = .Max(UInt) 15 | } 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | script: 12 | - set -o pipefail && xcodebuild test -workspace Example/SwiftCarousel.xcworkspace -scheme SwiftCarousel-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty 13 | - pod lib lint 14 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/SwiftCarousel.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "UIKit" 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 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/SwiftCarousel.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "UIKit" 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel" 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/SwiftCarousel/SwiftCarousel.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SwiftCarousel" 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 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel" 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/SwiftCarousel/SwiftCarousel.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SwiftCarousel" 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 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel" 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/SwiftCarousel/SwiftCarousel.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SwiftCarousel" 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 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftCarousel" 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/SwiftCarousel/SwiftCarousel.framework/Headers" 7 | OTHER_LDFLAGS = $(inherited) -framework "SwiftCarousel" 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 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/Assets.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 | } -------------------------------------------------------------------------------- /Examples/Example2/Example2/Assets.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 | } -------------------------------------------------------------------------------- /Examples/Example1/Pods/Local Podspecs/SwiftCarousel.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SwiftCarousel", 3 | "version": "0.8.0", 4 | "summary": "Infinite carousel of options.", 5 | "description": "SwiftCarousel is a fully native Swift UIScrollView wrapper, that allows you to infinite circular scroll with UIView objects.", 6 | "homepage": "https://github.com/Sunshinejr/SwiftCarousel", 7 | "license": "MIT", 8 | "authors": { 9 | "Łukasz Mróz": "lukasz.mroz@droidsonroids.pl" 10 | }, 11 | "source": { 12 | "git": "https://github.com/DroidsOnRoids/SwiftCarousel.git", 13 | "tag": "0.8.0" 14 | }, 15 | "social_media_url": "https://twitter.com/thesunshinejr", 16 | "platforms": { 17 | "ios": "8.0" 18 | }, 19 | "requires_arc": true, 20 | "source_files": "Source/*.swift", 21 | "frameworks": "UIKit" 22 | } 23 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Local Podspecs/SwiftCarousel.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SwiftCarousel", 3 | "version": "0.8.0", 4 | "summary": "Infinite carousel of options.", 5 | "description": "SwiftCarousel is a fully native Swift UIScrollView wrapper, that allows you to infinite circular scroll with UIView objects.", 6 | "homepage": "https://github.com/Sunshinejr/SwiftCarousel", 7 | "license": "MIT", 8 | "authors": { 9 | "Łukasz Mróz": "lukasz.mroz@droidsonroids.pl" 10 | }, 11 | "source": { 12 | "git": "https://github.com/DroidsOnRoids/SwiftCarousel.git", 13 | "tag": "0.8.0" 14 | }, 15 | "social_media_url": "https://twitter.com/thesunshinejr", 16 | "platforms": { 17 | "ios": "8.0" 18 | }, 19 | "requires_arc": true, 20 | "source_files": "Source/*.swift", 21 | "frameworks": "UIKit" 22 | } 23 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/output-file-map.json: -------------------------------------------------------------------------------- 1 | { 2 | "": { 3 | "swift-dependencies": "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/master.swiftdeps" 4 | }, 5 | "/Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift": { 6 | "dependencies": "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel.d", 7 | "object": "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o", 8 | "swiftmodule": "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel~partial.swiftmodule", 9 | "swift-dependencies": "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel.swiftdeps" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SwiftCarousel.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "SwiftCarousel" 3 | s.version = "0.8.0" 4 | s.summary = "Infinite carousel of options." 5 | s.description = "SwiftCarousel is a fully native Swift UIScrollView wrapper, that allows you to infinite circular scroll with UIView objects." 6 | s.homepage = "https://github.com/Sunshinejr/SwiftCarousel" 7 | s.license = 'MIT' 8 | s.author = { "Łukasz Mróz" => "lukasz.mroz@droidsonroids.pl" } 9 | s.source = { :git => "https://github.com/DroidsOnRoids/SwiftCarousel.git", :tag => s.version.to_s } 10 | s.social_media_url = 'https://twitter.com/thesunshinejr' 11 | 12 | s.platform = :ios, '8.0' 13 | s.requires_arc = true 14 | 15 | s.source_files = 'Source/*.swift' 16 | s.frameworks = 'UIKit' 17 | end 18 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/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 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/SwiftCarousel/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.8.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/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 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/SwiftCarousel/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.8.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel.d: -------------------------------------------------------------------------------- 1 | /Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o : /Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule 2 | /Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel~partial.swiftmodule : /Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule 3 | /Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel~partial.swiftdoc : /Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2015 Droids On Roids LLC 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SwiftCarousel 5 | 6 | The MIT License (MIT) 7 | Copyright (c) 2015 Droids On Roids LLC 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | 15 | Generated by CocoaPods - https://cocoapods.org 16 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SwiftCarousel 5 | 6 | The MIT License (MIT) 7 | Copyright (c) 2015 Droids On Roids LLC 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | 15 | Generated by CocoaPods - https://cocoapods.org 16 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Source/SwiftCarousel+UIGestureRecognizerDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | extension SwiftCarousel: UIGestureRecognizerDelegate { 24 | 25 | public func gestureRecognizer(_: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith shouldRecognizeSimultaneouslyWithGestureRecognizer: UIGestureRecognizer) -> Bool { 26 | return true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Changelog.md: -------------------------------------------------------------------------------- 1 | # Next 2 | 3 | # 0.8.0 4 | - Swift 3.0 support! 🎉 5 | 6 | # 0.7.1 7 | - Fixed bug with unused variable causing CI to fail (due to 0.7). 8 | 9 | # 0.7 10 | - Add `scrollType` property which constraints the scrolling of the carousel. 11 | 12 | # 0.6.1 13 | - Fix selector syntax for Swift 2.2 14 | 15 | # 0.6 16 | - **Breaking change** `didSelectItem(item:index:)` changed to `didSelectItem(item:index:tapped:)`. 17 | 18 | # 0.5 19 | - Add `itemsFactory(itemsCount:factory:)` method which can be used instead of items variable to set the carousel views. 20 | - **Breaking change** Replace convenience init `init(frame:choices:)` to `init(frame:items:)`. 21 | - Change Example2 to use `itemsFactory(itemsCount:factory:)` instead of `items`. 22 | - Improve `UIView().copyView()` (it will copy also constraints now for view & subviews). 23 | 24 | # 0.4.1 25 | - Quickfix to bug that was created by 0.4, when you scrolled one on the left or right, the scroll would freak out. 26 | - Fix to default selecting, now it behaves correctly. 27 | 28 | # 0.4 29 | - 🚀Fixed bug when you spinned the carousel while it was spinning. When you did this, the carousel would mess up the destination target and wouldn’t really select the item in the middle, but slightly off. 30 | 31 | # 0.3 32 | - Clicking (or tapping) on item now by default selects the item in carousel. 33 | 34 | # 0.2.2 35 | - Fixed `selectItem(_:animated)`. 36 | 37 | # 0.2 38 | - Moved from scroll delegates to KVO observing as the core of carousel. 39 | - Added `.FloatWithSpacing()` and `.WithoutResizing()` implementations. 40 | 41 | # 0.1 42 | - Initial release.🎉 43 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/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 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/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 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/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 | -------------------------------------------------------------------------------- /Source/SwiftCarouselScroll.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | public func ==(lhs: SwiftCarouselScroll, rhs: SwiftCarouselScroll) -> Bool { 24 | return String(stringInterpolationSegment: lhs) == String(stringInterpolationSegment: rhs) 25 | } 26 | 27 | /// Type for defining if the carousel should be constrained when scrolling. 28 | public enum SwiftCarouselScroll: Equatable { 29 | /// .Default = .Freely 30 | case `default` 31 | /// Set maximum number of items that user can scroll 32 | /// If you pass 0, it will be set to .None. 33 | case max(UInt) 34 | /// Don't allow scrolling. 35 | case none 36 | /// Doesn't limit the scroll at all. You can scroll how far you want. 37 | case freely 38 | /// TODO: 39 | // Set exact amount of items per scroll. 40 | // case Amount(UInt) 41 | } 42 | -------------------------------------------------------------------------------- /Source/UIView+SwiftCarousel.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | public enum ArchiveCopyingError: Error { 24 | case view 25 | } 26 | 27 | public extension UIView { 28 | fileprivate func prepareConstraintsForArchiving() { 29 | constraints.forEach { $0.shouldBeArchived = true } 30 | subviews.forEach { $0.prepareConstraintsForArchiving() } 31 | } 32 | 33 | /** 34 | Method to copy UIView using archivizing. 35 | 36 | - returns: Copied UIView (different memory address than current) 37 | */ 38 | public func copyView() throws -> UIView { 39 | prepareConstraintsForArchiving() 40 | guard let view = NSKeyedUnarchiver.unarchiveObject(with: NSKeyedArchiver.archivedData(withRootObject: self)) as? UIView else { throw ArchiveCopyingError.view } 41 | return view 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Source/SwiftCarouselResizeType.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | /// Enum to indicate resize type Carousel will be using. 24 | public enum SwiftCarouselResizeType { 25 | /// WithoutResizing is adding frames as they are. 26 | /// Parameter = spacing between UIViews. 27 | /// !!You need to pass correct frame sizes as items!! 28 | case withoutResizing(CGFloat) 29 | 30 | /// VisibleItemsPerPage will try to fit the number of items you specify 31 | /// in the whole screen (will resize them of course). 32 | /// Parameter = number of items visible on screen. 33 | case visibleItemsPerPage(Int) 34 | 35 | /// FloatWithSpacing will use sizeToFit() on your views to correctly place images 36 | /// It is helpful for instance with UILabels (Example1 in Examples folder). 37 | /// Parameter = spacing between UIViews. 38 | case floatWithSpacing(CGFloat) 39 | } 40 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/llbuild.yaml: -------------------------------------------------------------------------------- 1 | client: 2 | name: swift-build 3 | 4 | tools: {} 5 | 6 | targets: 7 | "": [] 8 | SwiftCarousel: [] 9 | 10 | commands: 11 | : 12 | tool: swift-compiler 13 | executable: "/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc" 14 | inputs: ["/Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift"] 15 | outputs: ["","/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.swiftmodule","/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o"] 16 | module-name: "SwiftCarousel" 17 | module-output-path: "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.swiftmodule" 18 | is-library: true 19 | sources: ["/Users/lukaszmroz/Desktop/Example1/Packages/SwiftCarousel-1.0.0/Sources/SwiftCarousel.swift"] 20 | objects: ["/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o"] 21 | import-paths: ["/Users/lukaszmroz/Desktop/Example1/.build/debug"] 22 | temps-path: "/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel" 23 | other-args: ["-j8","-Onone","-g","-target","x86_64-apple-macosx10.10","-enable-testing","-sdk","/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk","-I","/usr/local/include"] 24 | : 25 | tool: shell 26 | inputs: ["","/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o"] 27 | outputs: ["","/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.a"] 28 | args: ["/bin/sh","-c","rm -f '/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.a'; ar cr '/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.a' '/Users/lukaszmroz/Desktop/Example1/.build/debug/SwiftCarousel.o/Sources/SwiftCarousel.swift.o'"] 29 | description: "Linking Library: .build/debug/SwiftCarousel.a" 30 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-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 | The MIT License (MIT) 18 | Copyright (c) 2015 Droids On Roids LLC 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | License 27 | MIT 28 | Title 29 | SwiftCarousel 30 | Type 31 | PSGroupSpecifier 32 | 33 | 34 | FooterText 35 | Generated by CocoaPods - https://cocoapods.org 36 | Title 37 | 38 | Type 39 | PSGroupSpecifier 40 | 41 | 42 | StringsTable 43 | Acknowledgements 44 | Title 45 | Acknowledgements 46 | 47 | 48 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-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 | The MIT License (MIT) 18 | Copyright (c) 2015 Droids On Roids LLC 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | License 27 | MIT 28 | Title 29 | SwiftCarousel 30 | Type 31 | PSGroupSpecifier 32 | 33 | 34 | FooterText 35 | Generated by CocoaPods - https://cocoapods.org 36 | Title 37 | 38 | Type 39 | PSGroupSpecifier 40 | 41 | 42 | StringsTable 43 | Acknowledgements 44 | Title 45 | Acknowledgements 46 | 47 | 48 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example1 4 | // 5 | // Created by Lukasz Mroz on 10.12.2015. 6 | // Copyright © 2015 Droids on Roids. 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 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example2 4 | // 5 | // Created by Lukasz Mroz on 11.12.2015. 6 | // Copyright © 2015 Droids on Roids. 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 | -------------------------------------------------------------------------------- /Examples/Example2/Example2/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example2 4 | // 5 | // Created by Lukasz Mroz on 11.12.2015. 6 | // Copyright © 2015 Droids on Roids. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftCarousel 11 | 12 | class ViewController: UIViewController { 13 | 14 | var carouselView: SwiftCarousel! 15 | var choices: [UIView]! 16 | var label: UILabel! 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | // Do any additional setup after loading the view, typically from a nib. 21 | 22 | let carouselFrame = CGRect(x: view.center.x - 200.0, y: view.center.y - 100.0, width: 400.0, height: 200.0) 23 | carouselView = SwiftCarousel(frame: carouselFrame) 24 | try! carouselView.itemsFactory(itemsCount: 5) { choice in 25 | let imageView = UIImageView(image: UIImage(named: "puppy\(choice+1)")) 26 | imageView.frame = CGRect(origin: .zero, size: CGSize(width: 200.0, height: 200.0)) 27 | 28 | return imageView 29 | } 30 | carouselView.resizeType = .withoutResizing(10.0) 31 | carouselView.delegate = self 32 | carouselView.defaultSelectedIndex = 2 33 | view.addSubview(carouselView) 34 | 35 | let labelFrame = CGRect(x: view.center.x - 150.0, y: carouselFrame.minY - 40.0, width: 300.0, height: 20.0) 36 | label = UILabel(frame: labelFrame) 37 | label.text = "" 38 | label.textColor = .black 39 | label.textAlignment = .center 40 | view.addSubview(label) 41 | 42 | let titleFrame = CGRect(x: view.center.x - 150.0, y: 60.0, width: 300.0, height: 24.0) 43 | let title = UILabel(frame: titleFrame) 44 | title.text = "Puppy selector 🐶🐱" 45 | title.font = .systemFont(ofSize: 24.0) 46 | title.textColor = .black 47 | title.textAlignment = .center 48 | 49 | view.addSubview(title) 50 | } 51 | } 52 | 53 | extension ViewController: SwiftCarouselDelegate { 54 | private func didSelectItem(item: UIView, index: Int) -> UIView? { 55 | label.text = index < 2 ? "🐶 number \(index+1) won! Woof woof 🐶" : "🐱 number \(index - 1) won! Meeeeeeow 🐱" 56 | 57 | return nil 58 | } 59 | 60 | func willBeginDragging(withOffset offset: CGPoint) { 61 | label.text = "Searching for some love..." 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example1 4 | // 5 | // Created by Lukasz Mroz on 10.12.2015. 6 | // Copyright © 2015 Droids on Roids. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftCarousel 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var carousel: SwiftCarousel! 15 | @IBOutlet weak var selectedTextLabel: UILabel! 16 | var items: [String]? 17 | var itemsViews: [UILabel]? 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | // Do any additional setup after loading the view, typically from a nib. 22 | items = ["Elephants", "Tigers", "Chickens", "Owls", "Rats", "Parrots", "Snakes"] 23 | itemsViews = items!.map { labelForString($0) } 24 | carousel.items = itemsViews! 25 | carousel.resizeType = .visibleItemsPerPage(3) 26 | carousel.defaultSelectedIndex = 3 27 | carousel.delegate = self 28 | carousel.scrollType = .default 29 | } 30 | 31 | func labelForString(_ string: String) -> UILabel { 32 | let text = UILabel() 33 | text.text = string 34 | text.textColor = .black 35 | text.textAlignment = .center 36 | text.font = .systemFont(ofSize: 24.0) 37 | text.numberOfLines = 0 38 | 39 | return text 40 | } 41 | 42 | @IBAction func selectTigers(_ sender: AnyObject) { 43 | carousel.selectItem(1, animated: true) 44 | } 45 | } 46 | 47 | 48 | extension ViewController: SwiftCarouselDelegate { 49 | 50 | func didSelectItem(item: UIView, index: Int, tapped: Bool) -> UIView? { 51 | if let animal = item as? UILabel { 52 | animal.textColor = UIColor.red 53 | selectedTextLabel.text = "So you like \(animal.text!), eh?" 54 | 55 | return animal 56 | } 57 | 58 | return item 59 | } 60 | 61 | func didDeselectItem(item: UIView, index: Int) -> UIView? { 62 | if let animal = item as? UILabel { 63 | animal.textColor = .black 64 | 65 | return animal 66 | } 67 | 68 | return item 69 | } 70 | 71 | func didScroll(toOffset offset: CGPoint) { 72 | selectedTextLabel.text = "Spinning up!" 73 | } 74 | 75 | func willBeginDragging(withOffset offset: CGPoint) { 76 | selectedTextLabel.text = "So you're gonna drag me now?" 77 | } 78 | 79 | func didEndDragging(withOffset offset: CGPoint) { 80 | selectedTextLabel.text = "Oh, here we go!" 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Source/SwiftCarouselDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | 24 | @objc public protocol SwiftCarouselDelegate { 25 | /** 26 | Delegate method that fires up when item has been selected. 27 | If there was an animation, it fires up _after_ animation. 28 | Warning! Do not rely on item to get index from your data source. 29 | Index is passed as a variable in that function and you should use it instead. 30 | 31 | - parameter item: Item that is selected. You can style it as you want. 32 | - parameter index: Index of selected item that you can use with your data source. 33 | - parameter tapped: Indicate that the item has been tapped, true it means that it was tapped before the selection, and false that was scrolled. 34 | 35 | - returns: Return UIView that you customized (or not). 36 | */ 37 | @objc optional func didSelectItem(item: UIView, index: Int, tapped: Bool) -> UIView? 38 | 39 | /** 40 | Delegate method that fires up when item has been deselected. 41 | If there was an animation, it fires up _after_ animation. 42 | Warning! Do not rely on item to get index from your data source. 43 | Index is passed as a variable in that function and you should use it instead. 44 | 45 | - parameter item: Item that is deselected. You can style it as you want. 46 | - parameter index: Index of deselected item that you can use with your data source. 47 | 48 | - returns: Return UIView that you customized (or not). 49 | */ 50 | @objc optional func didDeselectItem(item: UIView, index: Int) -> UIView? 51 | 52 | /** 53 | Delegate method that fires up when Carousel has been scrolled. 54 | 55 | - parameter offset: New offset of the Carousel. 56 | */ 57 | @objc optional func didScroll(toOffset offset: CGPoint) 58 | /** 59 | Delegate method that fires up just before someone did dragging. 60 | 61 | - parameter offset: Current offset of the Carousel. 62 | */ 63 | @objc optional func willBeginDragging(withOffset offset: CGPoint) 64 | /** 65 | Delegate method that fires up right after someone did end dragging. 66 | 67 | - parameter offset: New offset of the Carousel. 68 | */ 69 | @objc optional func didEndDragging(withOffset offset: CGPoint) 70 | } 71 | -------------------------------------------------------------------------------- /Source/SwiftCarousel+UIScrollViewDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | extension SwiftCarousel: UIScrollViewDelegate { 24 | public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 25 | didSelectItem() 26 | } 27 | 28 | public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) { 29 | didSelectItem() 30 | } 31 | 32 | public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { 33 | delegate?.willBeginDragging?(withOffset: scrollView.contentOffset) 34 | } 35 | 36 | public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) { 37 | delegate?.didEndDragging?(withOffset: scrollView.contentOffset) 38 | } 39 | 40 | public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { 41 | var velocity = velocity.x * 300.0 42 | 43 | var targetX = scrollView.frame.width / 2.0 + velocity 44 | 45 | // When the target is being scrolled and we scroll again, 46 | // the position we need to take as base should be the destination 47 | // because velocity will stay and if we will take the current position 48 | // we won't get correct item because the X distance we skipped in the 49 | // last circle wasn't included in the calculations. 50 | if let oldTargetX = currentVelocityX { 51 | targetX += (oldTargetX - scrollView.contentOffset.x) 52 | } else { 53 | targetX += scrollView.contentOffset.x 54 | } 55 | 56 | if velocity >= maxVelocity { 57 | velocity = maxVelocity 58 | } else if velocity <= -maxVelocity { 59 | velocity = -maxVelocity 60 | } 61 | 62 | if (targetX > scrollView.contentSize.width || targetX < 0.0) { 63 | targetX = scrollView.contentSize.width / 3.0 + velocity 64 | } 65 | 66 | let choiceView = nearestViewAtLocation(CGPoint(x: targetX, y: scrollView.frame.minY)) 67 | let newTargetX = choiceView.center.x - scrollView.frame.width / 2.0 68 | currentVelocityX = newTargetX 69 | targetContentOffset.pointee.x = newTargetX 70 | if case .max(_) = scrollType { 71 | scrollView.isScrollEnabled = false 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-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/SwiftCarousel/SwiftCarousel.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/SwiftCarousel/SwiftCarousel.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-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/SwiftCarousel/SwiftCarousel.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/SwiftCarousel/SwiftCarousel.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Target Support Files/Pods-Example1/Pods-Example1-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 | -------------------------------------------------------------------------------- /Examples/Example2/Pods/Target Support Files/Pods-Example2/Pods-Example2-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 | -------------------------------------------------------------------------------- /Examples/Example1/Example1/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 40 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftCarousel 2 | 3 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 4 | [![Version](https://img.shields.io/cocoapods/v/SwiftCarousel.svg?style=flat)](http://cocoapods.org/pods/SwiftCarousel) 5 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 6 | [![License](https://img.shields.io/cocoapods/l/SwiftCarousel.svg?style=flat)](http://cocoapods.org/pods/SwiftCarousel) 7 | [![Platform](https://img.shields.io/cocoapods/p/SwiftCarousel.svg?style=flat)](http://cocoapods.org/pods/SwiftCarousel) 8 | [![Twitter](https://img.shields.io/badge/twitter-@thesunshinejr-blue.svg?style=flat)](https://twitter.com/thesunshinejr) 9 | 10 | SwiftCarousel is a lightweight, written natively in Swift, circular UIScrollView.
11 | So what is there more to that than just a circular scroll view? You can spin it like a real carousel! 12 | 13 |
14 |
15 | SwiftCarousel example 16 | SwiftCarousel example 17 |
18 |
19 | 20 | ## Requirements 21 | 22 | Swift 2.0, iOS 9 23 | 24 | ## Installation 25 | 26 | SwiftCarousel is available through [CocoaPods](http://cocoapods.org). To install 27 | it, simply add the following line to your Podfile: 28 | 29 | ```ruby 30 | pod "SwiftCarousel" 31 | ``` 32 | 33 | Then run `pod install` and it should be 🔥 34 | Also remember to add `import SwiftCarousel` in your project. 35 | 36 | ## Examples 37 | You can use Examples directory for examples with creating SwiftCarousel using IB or code. 38 | 39 | ## Basic usage using Interface Builder (Storyboard/xibs) 40 | 41 | First, create `UIView` object and assign `SwiftCarousel` class to it. 42 | Then we need to assign some selectable `UIViews`. It might be `UILabels`, `UIImageViews` etc. 43 | The last step would be setting correct `resizeType` parameter which contains: 44 | 45 | ```swift 46 | public enum SwiftCarouselResizeType { 47 | // WithoutResizing is adding frames as they are. 48 | // Parameter = spacing between UIViews. 49 | // !!You need to pass correct frame sizes as items!! 50 | case WithoutResizing(CGFloat) 51 | 52 | // VisibleItemsPerPage will try to fit the number of items you specify 53 | // in the whole screen (will resize them of course). 54 | // Parameter = number of items visible on screen. 55 | case VisibleItemsPerPage(Int) 56 | 57 | // FloatWithSpacing will use sizeToFit() on your views to correctly place images 58 | // It is helpful for instance with UILabels (Example1 in Examples folder). 59 | // Parameter = spacing between UIViews. 60 | case FloatWithSpacing(CGFloat) 61 | } 62 | ``` 63 | 64 | Basic setup would look like: 65 | 66 | ```swift 67 | override func viewDidLoad() { 68 | super.viewDidLoad() 69 | // Do any additional setup after loading the view, typically from a nib. 70 | items = ["Elephants", "Tigers", "Chickens", "Owls", "Rats", "Parrots", "Snakes"] 71 | itemsViews = items!.map { labelForString($0) } 72 | carousel.items = itemsViews! 73 | carousel.resizeType = .VisibleItemsPerPage(3) 74 | carousel.defaultSelectedIndex = 3 // Select default item at start 75 | carousel.delegate = self 76 | } 77 | 78 | func labelForString(string: String) -> UILabel { 79 | let text = UILabel() 80 | text.text = string 81 | text.textColor = .blackColor() 82 | text.textAlignment = .Center 83 | text.font = .systemFontOfSize(24.0) 84 | text.numberOfLines = 0 85 | 86 | return text 87 | } 88 | ``` 89 | 90 | ## Basic usage using pure code 91 | 92 | Here we use `itemsFactory(itemsCount:facory:)` method. This method allows you to setup your carousel using closure rather than static array of views. Why would we want to use that? In case of quite complicated logic. E.g. if you want to have `CALayer` properties all across the carousel. 93 | 94 | ```swift 95 | let carouselFrame = CGRect(x: view.center.x - 200.0, y: view.center.y - 100.0, width: 400.0, height: 200.0) 96 | carouselView = SwiftCarousel(frame: carouselFrame) 97 | try! carouselView.itemsFactory(itemsCount: 5) { choice in 98 | let imageView = UIImageView(image: UIImage(named: "puppy\(choice+1)")) 99 | imageView.frame = CGRect(origin: CGPointZero, size: CGSize(width: 200.0, height: 200.0)) 100 | 101 | return imageView 102 | } 103 | carouselView.resizeType = .WithoutResizing(10.0) 104 | carouselView.delegate = self 105 | carouselView.defaultSelectedIndex = 2 106 | view.addSubview(carouselView) 107 | ``` 108 | 109 | ## Additional methods, properties & delegate 110 | 111 | You can use method `selectItem(_:animated:)` to programmatically select your item: 112 | ```swift 113 | carousel.selectItem(1, animated: true) 114 | ``` 115 | 116 | Or you can set default selected item: 117 | ```swift 118 | carousel.defaultSelectedIndex = 3 119 | ``` 120 | 121 | You can disable selecting item by tapping it (its enabled by default): 122 | ```swift 123 | carousel.selectByTapEnabled = false 124 | ``` 125 | 126 | You can also get current selected index: 127 | ```swift 128 | let selectedIndex = carousel.selectedIndex 129 | ``` 130 | 131 | You can implement `SwiftCarouselDelegate` protocol: 132 | ```swift 133 | @objc public protocol SwiftCarouselDelegate { 134 | optional func didSelectItem(item item: UIView, index: Int, tapped: Bool) -> UIView? 135 | optional func didDeselectItem(item item: UIView, index: Int) -> UIView? 136 | optional func didScroll(toOffset offset: CGPoint) -> Void 137 | optional func willBeginDragging(withOffset offset: CGPoint) -> Void 138 | optional func didEndDragging(withOffset offset: CGPoint) -> Void 139 | } 140 | ``` 141 | 142 | Then you need to set the `delegate` property: 143 | ```swift 144 | carousel.delegate = self 145 | ``` 146 | 147 | If you need more, basic usages in Example1 project in directory Examples. 148 | 149 | ## Known limitations 150 | 151 | The original views are internally copied to using the `copyView` method defined in the `UIView+SwiftCarousel` extension when using the `items` property. This performs a shallow copy of the view using `NSKeyedUnarchiver` and `NSKeyedArchiver`. So, if a custom `UIView` subclass with references to external objects is used, those references might be nil when `didSelectItem` and `didDeselectItem` delegate methods are called. To avoid this situation, the `itemsFactory` method can be used instead of the `items` property to setup the carousel. 152 | 153 | ## Contributing 154 | Feel free to make issues/pull requests if you have some questions, ideas for improvement, or maybe bugs you've found. 155 | After some contribution I'm giving write access as a thank you 🎉 156 | 157 | ## Author 158 | 159 | Sunshinejr, thesunshinejr@gmail.com, @thesunshinejr 160 | 161 | ## License 162 | 163 | SwiftCarousel is available under the MIT license. See the LICENSE file for more info. 164 | -------------------------------------------------------------------------------- /Examples/Example1/.build/debug/SwiftCarousel.o/SwiftCarousel/SwiftCarousel.swiftdeps: -------------------------------------------------------------------------------- 1 | ### Swift dependencies file v0 ### 2 | provides-top-level: 3 | - "CarouselResizeType" 4 | - "SwiftCarousel" 5 | provides-nominal: 6 | - "O13SwiftCarousel18CarouselResizeType" 7 | - "C13SwiftCarousel13SwiftCarousel" 8 | provides-member: 9 | - ["O13SwiftCarousel18CarouselResizeType", ""] 10 | - ["C13SwiftCarousel13SwiftCarousel", ""] 11 | provides-dynamic-lookup: 12 | depends-top-level: 13 | - "NSCoder" 14 | - !private "!=" 15 | - "CarouselResizeType" 16 | - !private "backgroundColor" 17 | - !private "CGRectGetMinX" 18 | - !private ">" 19 | - !private "UIColor" 20 | - !private "addConstraints" 21 | - !private "<" 22 | - !private "NSLayoutConstraint" 23 | - !private "frame" 24 | - !private "+=" 25 | - "Int" 26 | - "FloatLiteralType" 27 | - "Array" 28 | - "CGRect" 29 | - !private "CGRectGetMaxX" 30 | - "IntegerLiteralType" 31 | - !private "..<" 32 | - !private "<=" 33 | - !private "-=" 34 | - !private "*" 35 | - "Double" 36 | - "UIScrollViewDelegate" 37 | - !private "layoutIfNeeded" 38 | - "SwiftCarousel" 39 | - !private "/" 40 | - !private "CGSize" 41 | - "UIView" 42 | - !private "Bool" 43 | - !private "-" 44 | - !private ">=" 45 | - "UnsafeMutablePointer" 46 | - !private "+" 47 | - !private "||" 48 | - !private "==" 49 | - !private "CGRectGetMinY" 50 | - "CGFloat" 51 | - "UIScrollView" 52 | - "CGPoint" 53 | - !private "addSubview" 54 | depends-member: 55 | - !private ["Ps9AnyObject", "CGPoint"] 56 | - !private ["Ps9AnyObject", "CGRectGetMaxX"] 57 | - !private ["Ps9AnyObject", "CGRectGetMinX"] 58 | - !private ["Ps9AnyObject", "CGRectGetMinY"] 59 | - !private ["Ps9AnyObject", "CGSize"] 60 | - !private ["Ps9AnyObject", "NSLayoutConstraint"] 61 | - !private ["Ps9AnyObject", "UIColor"] 62 | - ["Ps9AnyObject", "UIScrollView"] 63 | - !private ["Ps9AnyObject", "addConstraints"] 64 | - !private ["Ps9AnyObject", "addSubview"] 65 | - !private ["Ps9AnyObject", "backgroundColor"] 66 | - !private ["Ps9AnyObject", "choices"] 67 | - !private ["Ps9AnyObject", "defaultSelectedIndex"] 68 | - !private ["Ps9AnyObject", "frame"] 69 | - !private ["Ps9AnyObject", "layoutIfNeeded"] 70 | - !private ["Ps9AnyObject", "maxVelocity"] 71 | - !private ["Ps9AnyObject", "nearestViewAtLocation"] 72 | - !private ["Ps9AnyObject", "originalChoicesNumber"] 73 | - !private ["Ps9AnyObject", "resizeType"] 74 | - !private ["Ps9AnyObject", "scrollView"] 75 | - !private ["Ps9AnyObject", "selectChoice"] 76 | - !private ["Ps9AnyObject", "setupViews"] 77 | - !private ["Ps9AnyObject", "viewAtLocation"] 78 | - ["Ps9AnyObject", ""] 79 | - !private ["Ps22BidirectionalIndexType", "Distance"] 80 | - !private ["Ps22BidirectionalIndexType", "IntegerLiteralType"] 81 | - !private ["Ps22BidirectionalIndexType", "_DisabledRangeIndex"] 82 | - !private ["Ps21BitwiseOperationsType", "Distance"] 83 | - !private ["Ps21BitwiseOperationsType", "IntegerLiteralType"] 84 | - !private ["Ps21BitwiseOperationsType", "_DisabledRangeIndex"] 85 | - !private ["Sb", "_getBuiltinLogicValue"] 86 | - !private ["Ps25BooleanLiteralConvertible", "_getBuiltinLogicValue"] 87 | - !private ["Ps11BooleanType", "_getBuiltinLogicValue"] 88 | - !private ["Ps11CVarArgType", "Distance"] 89 | - !private ["Ps11CVarArgType", "IntegerLiteralType"] 90 | - !private ["Ps11CVarArgType", "_DisabledRangeIndex"] 91 | - ["O13SwiftCarousel18CarouselResizeType", "CGFloat"] 92 | - ["O13SwiftCarousel18CarouselResizeType", "FloatWithSpacing"] 93 | - ["O13SwiftCarousel18CarouselResizeType", "Int"] 94 | - ["O13SwiftCarousel18CarouselResizeType", "VisibleItemsPerPage"] 95 | - ["O13SwiftCarousel18CarouselResizeType", "WithoutResizing"] 96 | - !private ["Ps14CollectionType", "Generator"] 97 | - !private ["Ps14CollectionType", "forEach"] 98 | - !private ["Ps10Comparable", "Distance"] 99 | - !private ["Ps10Comparable", "IntegerLiteralType"] 100 | - !private ["Ps10Comparable", "_DisabledRangeIndex"] 101 | - !private ["Ps28CustomDebugStringConvertible", "Generator"] 102 | - !private ["Ps28CustomDebugStringConvertible", "forEach"] 103 | - !private ["Ps23CustomStringConvertible", "Distance"] 104 | - !private ["Ps23CustomStringConvertible", "Generator"] 105 | - !private ["Ps23CustomStringConvertible", "IntegerLiteralType"] 106 | - !private ["Ps23CustomStringConvertible", "_DisabledRangeIndex"] 107 | - !private ["Ps23CustomStringConvertible", "_getBuiltinLogicValue"] 108 | - !private ["Ps23CustomStringConvertible", "forEach"] 109 | - !private ["Ps9Equatable", "Distance"] 110 | - !private ["Ps9Equatable", "Generator"] 111 | - !private ["Ps9Equatable", "IntegerLiteralType"] 112 | - !private ["Ps9Equatable", "_DisabledRangeIndex"] 113 | - !private ["Ps9Equatable", "_getBuiltinLogicValue"] 114 | - !private ["Ps9Equatable", "forEach"] 115 | - !private ["Ps16ForwardIndexType", "Distance"] 116 | - !private ["Ps16ForwardIndexType", "IntegerLiteralType"] 117 | - !private ["Ps16ForwardIndexType", "_DisabledRangeIndex"] 118 | - !private ["Ps13GeneratorType", "Element"] 119 | - !private ["Vs16HalfOpenInterval", "forEach"] 120 | - !private ["Ps8Hashable", "Distance"] 121 | - !private ["Ps8Hashable", "IntegerLiteralType"] 122 | - !private ["Ps8Hashable", "_DisabledRangeIndex"] 123 | - !private ["Ps8Hashable", "_getBuiltinLogicValue"] 124 | - !private ["Ps9Indexable", "Generator"] 125 | - !private ["Ps9Indexable", "forEach"] 126 | - !private ["Si", "Distance"] 127 | - !private ["Si", "IntegerLiteralType"] 128 | - !private ["Si", "_DisabledRangeIndex"] 129 | - !private ["Ps21IntegerArithmeticType", "Distance"] 130 | - !private ["Ps21IntegerArithmeticType", "IntegerLiteralType"] 131 | - !private ["Ps21IntegerArithmeticType", "_DisabledRangeIndex"] 132 | - !private ["Ps25IntegerLiteralConvertible", "Distance"] 133 | - !private ["Ps25IntegerLiteralConvertible", "IntegerLiteralType"] 134 | - !private ["Ps25IntegerLiteralConvertible", "_DisabledRangeIndex"] 135 | - !private ["Ps11IntegerType", "Distance"] 136 | - !private ["Ps11IntegerType", "IntegerLiteralType"] 137 | - !private ["Ps11IntegerType", "_DisabledRangeIndex"] 138 | - !private ["Ps12IntervalType", "forEach"] 139 | - !private ["Ps14MirrorPathType", "Distance"] 140 | - !private ["Ps14MirrorPathType", "IntegerLiteralType"] 141 | - !private ["Ps14MirrorPathType", "_DisabledRangeIndex"] 142 | - !private ["Sq", "deinit"] 143 | - !private ["Ps21RandomAccessIndexType", "Distance"] 144 | - !private ["Ps21RandomAccessIndexType", "IntegerLiteralType"] 145 | - !private ["Ps21RandomAccessIndexType", "_DisabledRangeIndex"] 146 | - !private ["Vs5Range", "Generator"] 147 | - !private ["Vs5Range", "forEach"] 148 | - !private ["Vs14RangeGenerator", "Element"] 149 | - !private ["Ps12SequenceType", "Element"] 150 | - !private ["Ps12SequenceType", "Generator"] 151 | - !private ["Ps12SequenceType", "forEach"] 152 | - !private ["Ps17SignedIntegerType", "Distance"] 153 | - !private ["Ps17SignedIntegerType", "IntegerLiteralType"] 154 | - !private ["Ps17SignedIntegerType", "_DisabledRangeIndex"] 155 | - !private ["Ps16SignedNumberType", "Distance"] 156 | - !private ["Ps16SignedNumberType", "IntegerLiteralType"] 157 | - !private ["Ps16SignedNumberType", "_DisabledRangeIndex"] 158 | - !private ["Ps10Strideable", "Distance"] 159 | - !private ["Ps10Strideable", "IntegerLiteralType"] 160 | - !private ["Ps10Strideable", "_DisabledRangeIndex"] 161 | - ["C13SwiftCarousel13SwiftCarousel", "Array"] 162 | - !private ["C13SwiftCarousel13SwiftCarousel", "Bool"] 163 | - ["C13SwiftCarousel13SwiftCarousel", "CGFloat"] 164 | - ["C13SwiftCarousel13SwiftCarousel", "CGPoint"] 165 | - ["C13SwiftCarousel13SwiftCarousel", "CGRect"] 166 | - !private ["C13SwiftCarousel13SwiftCarousel", "CGRectGetMaxX"] 167 | - !private ["C13SwiftCarousel13SwiftCarousel", "CGRectGetMinX"] 168 | - !private ["C13SwiftCarousel13SwiftCarousel", "CGRectGetMinY"] 169 | - !private ["C13SwiftCarousel13SwiftCarousel", "CGSize"] 170 | - ["C13SwiftCarousel13SwiftCarousel", "CarouselResizeType"] 171 | - ["C13SwiftCarousel13SwiftCarousel", "Double"] 172 | - ["C13SwiftCarousel13SwiftCarousel", "Int"] 173 | - ["C13SwiftCarousel13SwiftCarousel", "NSCoder"] 174 | - !private ["C13SwiftCarousel13SwiftCarousel", "NSLayoutConstraint"] 175 | - !private ["C13SwiftCarousel13SwiftCarousel", "UIColor"] 176 | - ["C13SwiftCarousel13SwiftCarousel", "UIScrollView"] 177 | - ["C13SwiftCarousel13SwiftCarousel", "UIView"] 178 | - ["C13SwiftCarousel13SwiftCarousel", "UnsafeMutablePointer"] 179 | - !private ["C13SwiftCarousel13SwiftCarousel", "addConstraints"] 180 | - !private ["C13SwiftCarousel13SwiftCarousel", "addSubview"] 181 | - !private ["C13SwiftCarousel13SwiftCarousel", "backgroundColor"] 182 | - !private ["C13SwiftCarousel13SwiftCarousel", "choices"] 183 | - ["C13SwiftCarousel13SwiftCarousel", "defaultSelectedIndex"] 184 | - ["C13SwiftCarousel13SwiftCarousel", "deinit"] 185 | - !private ["C13SwiftCarousel13SwiftCarousel", "frame"] 186 | - !private ["C13SwiftCarousel13SwiftCarousel", "layoutIfNeeded"] 187 | - ["C13SwiftCarousel13SwiftCarousel", "layoutSubviews"] 188 | - !private ["C13SwiftCarousel13SwiftCarousel", "maxVelocity"] 189 | - !private ["C13SwiftCarousel13SwiftCarousel", "nearestViewAtLocation"] 190 | - !private ["C13SwiftCarousel13SwiftCarousel", "originalChoicesNumber"] 191 | - !private ["C13SwiftCarousel13SwiftCarousel", "refreshChoices"] 192 | - ["C13SwiftCarousel13SwiftCarousel", "resizeType"] 193 | - !private ["C13SwiftCarousel13SwiftCarousel", "scrollView"] 194 | - ["C13SwiftCarousel13SwiftCarousel", "selectChoice"] 195 | - !private ["C13SwiftCarousel13SwiftCarousel", "setup"] 196 | - !private ["C13SwiftCarousel13SwiftCarousel", "setupViews"] 197 | - !private ["C13SwiftCarousel13SwiftCarousel", "spacing"] 198 | - !private ["C13SwiftCarousel13SwiftCarousel", "viewAtLocation"] 199 | - !private ["Ps33_BuiltinBooleanLiteralConvertible", "_getBuiltinLogicValue"] 200 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "Distance"] 201 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "IntegerLiteralType"] 202 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "_DisabledRangeIndex"] 203 | - !private ["Ps14_Incrementable", "Distance"] 204 | - !private ["Ps14_Incrementable", "IntegerLiteralType"] 205 | - !private ["Ps14_Incrementable", "_DisabledRangeIndex"] 206 | - !private ["Ps22_IntegerArithmeticType", "Distance"] 207 | - !private ["Ps22_IntegerArithmeticType", "IntegerLiteralType"] 208 | - !private ["Ps22_IntegerArithmeticType", "_DisabledRangeIndex"] 209 | - !private ["Ps12_IntegerType", "Distance"] 210 | - !private ["Ps12_IntegerType", "IntegerLiteralType"] 211 | - !private ["Ps12_IntegerType", "_DisabledRangeIndex"] 212 | - !private ["Vs26_OptionalNilComparisonType", "deinit"] 213 | - !private ["Ps22_RandomAccessAmbiguity", "Distance"] 214 | - !private ["Ps22_RandomAccessAmbiguity", "IntegerLiteralType"] 215 | - !private ["Ps22_RandomAccessAmbiguity", "_DisabledRangeIndex"] 216 | - !private ["Ps12_Reflectable", "Distance"] 217 | - !private ["Ps12_Reflectable", "Generator"] 218 | - !private ["Ps12_Reflectable", "IntegerLiteralType"] 219 | - !private ["Ps12_Reflectable", "_DisabledRangeIndex"] 220 | - !private ["Ps12_Reflectable", "_getBuiltinLogicValue"] 221 | - !private ["Ps12_Reflectable", "forEach"] 222 | - !private ["Ps18_SignedIntegerType", "Distance"] 223 | - !private ["Ps18_SignedIntegerType", "IntegerLiteralType"] 224 | - !private ["Ps18_SignedIntegerType", "_DisabledRangeIndex"] 225 | depends-nominal: 226 | - "Ps9AnyObject" 227 | - !private "Ps22BidirectionalIndexType" 228 | - !private "Ps21BitwiseOperationsType" 229 | - !private "Sb" 230 | - !private "Ps25BooleanLiteralConvertible" 231 | - !private "Ps11BooleanType" 232 | - !private "Ps11CVarArgType" 233 | - "O13SwiftCarousel18CarouselResizeType" 234 | - !private "Ps14CollectionType" 235 | - !private "Ps10Comparable" 236 | - !private "Ps28CustomDebugStringConvertible" 237 | - !private "Ps23CustomStringConvertible" 238 | - !private "Ps9Equatable" 239 | - !private "Ps16ForwardIndexType" 240 | - !private "Ps13GeneratorType" 241 | - !private "Vs16HalfOpenInterval" 242 | - !private "Ps8Hashable" 243 | - !private "Ps9Indexable" 244 | - !private "Si" 245 | - !private "Ps21IntegerArithmeticType" 246 | - !private "Ps25IntegerLiteralConvertible" 247 | - !private "Ps11IntegerType" 248 | - !private "Ps12IntervalType" 249 | - !private "Ps14MirrorPathType" 250 | - !private "Sq" 251 | - !private "Ps21RandomAccessIndexType" 252 | - !private "Vs5Range" 253 | - !private "Vs14RangeGenerator" 254 | - !private "Ps12SequenceType" 255 | - !private "Ps17SignedIntegerType" 256 | - !private "Ps16SignedNumberType" 257 | - !private "Ps10Strideable" 258 | - "C13SwiftCarousel13SwiftCarousel" 259 | - !private "Ps33_BuiltinBooleanLiteralConvertible" 260 | - !private "Ps33_BuiltinIntegerLiteralConvertible" 261 | - !private "Ps14_Incrementable" 262 | - !private "Ps22_IntegerArithmeticType" 263 | - !private "Ps12_IntegerType" 264 | - !private "Vs26_OptionalNilComparisonType" 265 | - !private "Ps22_RandomAccessAmbiguity" 266 | - !private "Ps12_Reflectable" 267 | - !private "Ps18_SignedIntegerType" 268 | depends-dynamic-lookup: 269 | depends-external: 270 | - "/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx/x86_64/Swift.swiftmodule" 271 | interface-hash: "e56b022955298353fc4f628307d87ec8" 272 | -------------------------------------------------------------------------------- /Examples/Example2/Example2.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 14704B081C1ACFF600DBC502 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14704B071C1ACFF600DBC502 /* AppDelegate.swift */; }; 11 | 14704B0A1C1ACFF600DBC502 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14704B091C1ACFF600DBC502 /* ViewController.swift */; }; 12 | 14704B0D1C1ACFF600DBC502 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 14704B0B1C1ACFF600DBC502 /* Main.storyboard */; }; 13 | 14704B0F1C1ACFF600DBC502 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 14704B0E1C1ACFF600DBC502 /* Assets.xcassets */; }; 14 | 14704B121C1ACFF600DBC502 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 14704B101C1ACFF600DBC502 /* LaunchScreen.storyboard */; }; 15 | 14704B1A1C1AD91A00DBC502 /* SwiftCarousel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 14704B191C1AD91A00DBC502 /* SwiftCarousel.framework */; }; 16 | 5E7DB7AA5C0BE95F091DEB74 /* Pods_Example2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9126A3D59D1725F46EF3BFEE /* Pods_Example2.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 14704B041C1ACFF600DBC502 /* Example2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example2.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 14704B071C1ACFF600DBC502 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 14704B091C1ACFF600DBC502 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 14704B0C1C1ACFF600DBC502 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 14704B0E1C1ACFF600DBC502 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 14704B111C1ACFF600DBC502 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | 14704B131C1ACFF600DBC502 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | 14704B191C1AD91A00DBC502 /* SwiftCarousel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftCarousel.framework; path = "Pods/../build/Debug-iphoneos/SwiftCarousel.framework"; sourceTree = ""; }; 28 | 2EBFFD8BB7E204D0C82FA65F /* Pods-Example2.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example2.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example2/Pods-Example2.debug.xcconfig"; sourceTree = ""; }; 29 | 8B212BB6E091D2179953C680 /* Pods-Example2.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example2.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example2/Pods-Example2.release.xcconfig"; sourceTree = ""; }; 30 | 9126A3D59D1725F46EF3BFEE /* Pods_Example2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example2.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | A1B012AAAFC1CA938EB3B865 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 14704B011C1ACFF600DBC502 /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | 14704B1A1C1AD91A00DBC502 /* SwiftCarousel.framework in Frameworks */, 40 | 5E7DB7AA5C0BE95F091DEB74 /* Pods_Example2.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 14704AFB1C1ACFF600DBC502 = { 48 | isa = PBXGroup; 49 | children = ( 50 | 14704B061C1ACFF600DBC502 /* Example2 */, 51 | 14704B051C1ACFF600DBC502 /* Products */, 52 | 3844589EE610E888E5DAEC1C /* Frameworks */, 53 | EDFED6E146AB0BD4FD5C15B7 /* Pods */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 14704B051C1ACFF600DBC502 /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 14704B041C1ACFF600DBC502 /* Example2.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 14704B061C1ACFF600DBC502 /* Example2 */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 14704B071C1ACFF600DBC502 /* AppDelegate.swift */, 69 | 14704B091C1ACFF600DBC502 /* ViewController.swift */, 70 | 14704B0B1C1ACFF600DBC502 /* Main.storyboard */, 71 | 14704B0E1C1ACFF600DBC502 /* Assets.xcassets */, 72 | 14704B101C1ACFF600DBC502 /* LaunchScreen.storyboard */, 73 | 14704B131C1ACFF600DBC502 /* Info.plist */, 74 | ); 75 | path = Example2; 76 | sourceTree = ""; 77 | }; 78 | 3844589EE610E888E5DAEC1C /* Frameworks */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 14704B191C1AD91A00DBC502 /* SwiftCarousel.framework */, 82 | A1B012AAAFC1CA938EB3B865 /* Pods.framework */, 83 | 9126A3D59D1725F46EF3BFEE /* Pods_Example2.framework */, 84 | ); 85 | name = Frameworks; 86 | sourceTree = ""; 87 | }; 88 | EDFED6E146AB0BD4FD5C15B7 /* Pods */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 2EBFFD8BB7E204D0C82FA65F /* Pods-Example2.debug.xcconfig */, 92 | 8B212BB6E091D2179953C680 /* Pods-Example2.release.xcconfig */, 93 | ); 94 | name = Pods; 95 | sourceTree = ""; 96 | }; 97 | /* End PBXGroup section */ 98 | 99 | /* Begin PBXNativeTarget section */ 100 | 14704B031C1ACFF600DBC502 /* Example2 */ = { 101 | isa = PBXNativeTarget; 102 | buildConfigurationList = 14704B161C1ACFF600DBC502 /* Build configuration list for PBXNativeTarget "Example2" */; 103 | buildPhases = ( 104 | A150345C536AB364A0824AF6 /* [CP] Check Pods Manifest.lock */, 105 | 14704B001C1ACFF600DBC502 /* Sources */, 106 | 14704B011C1ACFF600DBC502 /* Frameworks */, 107 | 14704B021C1ACFF600DBC502 /* Resources */, 108 | 64239CFB16B4E8F7C9224B3C /* [CP] Embed Pods Frameworks */, 109 | 56455434B0FB789B9CFA4BCA /* [CP] Copy Pods Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = Example2; 116 | productName = Example2; 117 | productReference = 14704B041C1ACFF600DBC502 /* Example2.app */; 118 | productType = "com.apple.product-type.application"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 14704AFC1C1ACFF600DBC502 /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastSwiftUpdateCheck = 0720; 127 | LastUpgradeCheck = 0720; 128 | ORGANIZATIONNAME = "Lukasz Mroz"; 129 | TargetAttributes = { 130 | 14704B031C1ACFF600DBC502 = { 131 | CreatedOnToolsVersion = 7.2; 132 | LastSwiftMigration = 0800; 133 | }; 134 | }; 135 | }; 136 | buildConfigurationList = 14704AFF1C1ACFF600DBC502 /* Build configuration list for PBXProject "Example2" */; 137 | compatibilityVersion = "Xcode 3.2"; 138 | developmentRegion = English; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | Base, 143 | ); 144 | mainGroup = 14704AFB1C1ACFF600DBC502; 145 | productRefGroup = 14704B051C1ACFF600DBC502 /* Products */; 146 | projectDirPath = ""; 147 | projectRoot = ""; 148 | targets = ( 149 | 14704B031C1ACFF600DBC502 /* Example2 */, 150 | ); 151 | }; 152 | /* End PBXProject section */ 153 | 154 | /* Begin PBXResourcesBuildPhase section */ 155 | 14704B021C1ACFF600DBC502 /* Resources */ = { 156 | isa = PBXResourcesBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 14704B121C1ACFF600DBC502 /* LaunchScreen.storyboard in Resources */, 160 | 14704B0F1C1ACFF600DBC502 /* Assets.xcassets in Resources */, 161 | 14704B0D1C1ACFF600DBC502 /* Main.storyboard in Resources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXResourcesBuildPhase section */ 166 | 167 | /* Begin PBXShellScriptBuildPhase section */ 168 | 56455434B0FB789B9CFA4BCA /* [CP] Copy Pods Resources */ = { 169 | isa = PBXShellScriptBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | ); 173 | inputPaths = ( 174 | ); 175 | name = "[CP] Copy Pods Resources"; 176 | outputPaths = ( 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | shellPath = /bin/sh; 180 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example2/Pods-Example2-resources.sh\"\n"; 181 | showEnvVarsInLog = 0; 182 | }; 183 | 64239CFB16B4E8F7C9224B3C /* [CP] Embed Pods Frameworks */ = { 184 | isa = PBXShellScriptBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | inputPaths = ( 189 | ); 190 | name = "[CP] Embed Pods Frameworks"; 191 | outputPaths = ( 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | shellPath = /bin/sh; 195 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example2/Pods-Example2-frameworks.sh\"\n"; 196 | showEnvVarsInLog = 0; 197 | }; 198 | A150345C536AB364A0824AF6 /* [CP] Check Pods Manifest.lock */ = { 199 | isa = PBXShellScriptBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | inputPaths = ( 204 | ); 205 | name = "[CP] Check Pods Manifest.lock"; 206 | outputPaths = ( 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | shellPath = /bin/sh; 210 | 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"; 211 | showEnvVarsInLog = 0; 212 | }; 213 | /* End PBXShellScriptBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | 14704B001C1ACFF600DBC502 /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 14704B0A1C1ACFF600DBC502 /* ViewController.swift in Sources */, 221 | 14704B081C1ACFF600DBC502 /* AppDelegate.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXSourcesBuildPhase section */ 226 | 227 | /* Begin PBXVariantGroup section */ 228 | 14704B0B1C1ACFF600DBC502 /* Main.storyboard */ = { 229 | isa = PBXVariantGroup; 230 | children = ( 231 | 14704B0C1C1ACFF600DBC502 /* Base */, 232 | ); 233 | name = Main.storyboard; 234 | sourceTree = ""; 235 | }; 236 | 14704B101C1ACFF600DBC502 /* LaunchScreen.storyboard */ = { 237 | isa = PBXVariantGroup; 238 | children = ( 239 | 14704B111C1ACFF600DBC502 /* Base */, 240 | ); 241 | name = LaunchScreen.storyboard; 242 | sourceTree = ""; 243 | }; 244 | /* End PBXVariantGroup section */ 245 | 246 | /* Begin XCBuildConfiguration section */ 247 | 14704B141C1ACFF600DBC502 /* Debug */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 252 | CLANG_CXX_LIBRARY = "libc++"; 253 | CLANG_ENABLE_MODULES = YES; 254 | CLANG_ENABLE_OBJC_ARC = YES; 255 | CLANG_WARN_BOOL_CONVERSION = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_EMPTY_BODY = YES; 259 | CLANG_WARN_ENUM_CONVERSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 262 | CLANG_WARN_UNREACHABLE_CODE = YES; 263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 264 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 265 | COPY_PHASE_STRIP = NO; 266 | DEBUG_INFORMATION_FORMAT = dwarf; 267 | ENABLE_STRICT_OBJC_MSGSEND = YES; 268 | ENABLE_TESTABILITY = YES; 269 | GCC_C_LANGUAGE_STANDARD = gnu99; 270 | GCC_DYNAMIC_NO_PIC = NO; 271 | GCC_NO_COMMON_BLOCKS = YES; 272 | GCC_OPTIMIZATION_LEVEL = 0; 273 | GCC_PREPROCESSOR_DEFINITIONS = ( 274 | "DEBUG=1", 275 | "$(inherited)", 276 | ); 277 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 279 | GCC_WARN_UNDECLARED_SELECTOR = YES; 280 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 281 | GCC_WARN_UNUSED_FUNCTION = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 284 | MTL_ENABLE_DEBUG_INFO = YES; 285 | ONLY_ACTIVE_ARCH = YES; 286 | SDKROOT = iphoneos; 287 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 288 | }; 289 | name = Debug; 290 | }; 291 | 14704B151C1ACFF600DBC502 /* Release */ = { 292 | isa = XCBuildConfiguration; 293 | buildSettings = { 294 | ALWAYS_SEARCH_USER_PATHS = NO; 295 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 296 | CLANG_CXX_LIBRARY = "libc++"; 297 | CLANG_ENABLE_MODULES = YES; 298 | CLANG_ENABLE_OBJC_ARC = YES; 299 | CLANG_WARN_BOOL_CONVERSION = YES; 300 | CLANG_WARN_CONSTANT_CONVERSION = YES; 301 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 302 | CLANG_WARN_EMPTY_BODY = YES; 303 | CLANG_WARN_ENUM_CONVERSION = YES; 304 | CLANG_WARN_INT_CONVERSION = YES; 305 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 306 | CLANG_WARN_UNREACHABLE_CODE = YES; 307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 308 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 309 | COPY_PHASE_STRIP = NO; 310 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 311 | ENABLE_NS_ASSERTIONS = NO; 312 | ENABLE_STRICT_OBJC_MSGSEND = YES; 313 | GCC_C_LANGUAGE_STANDARD = gnu99; 314 | GCC_NO_COMMON_BLOCKS = YES; 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 322 | MTL_ENABLE_DEBUG_INFO = NO; 323 | SDKROOT = iphoneos; 324 | VALIDATE_PRODUCT = YES; 325 | }; 326 | name = Release; 327 | }; 328 | 14704B171C1ACFF600DBC502 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | baseConfigurationReference = 2EBFFD8BB7E204D0C82FA65F /* Pods-Example2.debug.xcconfig */; 331 | buildSettings = { 332 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 333 | CODE_SIGN_IDENTITY = "iPhone Developer"; 334 | FRAMEWORK_SEARCH_PATHS = ( 335 | "$(inherited)", 336 | "$(PROJECT_DIR)/build/Debug-iphoneos", 337 | ); 338 | INFOPLIST_FILE = Example2/Info.plist; 339 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 340 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 341 | PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.swiftcarousel.Example2; 342 | PRODUCT_NAME = "$(TARGET_NAME)"; 343 | SWIFT_VERSION = 3.0; 344 | }; 345 | name = Debug; 346 | }; 347 | 14704B181C1ACFF600DBC502 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = 8B212BB6E091D2179953C680 /* Pods-Example2.release.xcconfig */; 350 | buildSettings = { 351 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 352 | CODE_SIGN_IDENTITY = "iPhone Developer"; 353 | FRAMEWORK_SEARCH_PATHS = ( 354 | "$(inherited)", 355 | "$(PROJECT_DIR)/build/Debug-iphoneos", 356 | ); 357 | INFOPLIST_FILE = Example2/Info.plist; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 359 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 360 | PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.swiftcarousel.Example2; 361 | PRODUCT_NAME = "$(TARGET_NAME)"; 362 | SWIFT_VERSION = 3.0; 363 | }; 364 | name = Release; 365 | }; 366 | /* End XCBuildConfiguration section */ 367 | 368 | /* Begin XCConfigurationList section */ 369 | 14704AFF1C1ACFF600DBC502 /* Build configuration list for PBXProject "Example2" */ = { 370 | isa = XCConfigurationList; 371 | buildConfigurations = ( 372 | 14704B141C1ACFF600DBC502 /* Debug */, 373 | 14704B151C1ACFF600DBC502 /* Release */, 374 | ); 375 | defaultConfigurationIsVisible = 0; 376 | defaultConfigurationName = Release; 377 | }; 378 | 14704B161C1ACFF600DBC502 /* Build configuration list for PBXNativeTarget "Example2" */ = { 379 | isa = XCConfigurationList; 380 | buildConfigurations = ( 381 | 14704B171C1ACFF600DBC502 /* Debug */, 382 | 14704B181C1ACFF600DBC502 /* Release */, 383 | ); 384 | defaultConfigurationIsVisible = 0; 385 | defaultConfigurationName = Release; 386 | }; 387 | /* End XCConfigurationList section */ 388 | }; 389 | rootObject = 14704AFC1C1ACFF600DBC502 /* Project object */; 390 | } 391 | -------------------------------------------------------------------------------- /Examples/Example1/Example1.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 141038A91C19D58F001EB64D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 141038A81C19D58F001EB64D /* AppDelegate.swift */; }; 11 | 141038AB1C19D58F001EB64D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 141038AA1C19D58F001EB64D /* ViewController.swift */; }; 12 | 141038AE1C19D58F001EB64D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 141038AC1C19D58F001EB64D /* Main.storyboard */; }; 13 | 141038B01C19D58F001EB64D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 141038AF1C19D58F001EB64D /* Assets.xcassets */; }; 14 | 141038B31C19D58F001EB64D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 141038B11C19D58F001EB64D /* LaunchScreen.storyboard */; }; 15 | 141038BB1C19EBA9001EB64D /* SwiftCarousel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 141038BA1C19EBA9001EB64D /* SwiftCarousel.framework */; }; 16 | 38297828DAC367CC8F8C0AD7 /* Pods_Example1.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F11EA58841831BE61C702C28 /* Pods_Example1.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 0AB4529886D1FE4B00220E92 /* Pods-Example1.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example1.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example1/Pods-Example1.release.xcconfig"; sourceTree = ""; }; 21 | 141038A51C19D58F001EB64D /* Example1.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example1.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 141038A81C19D58F001EB64D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 141038AA1C19D58F001EB64D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 24 | 141038AD1C19D58F001EB64D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | 141038AF1C19D58F001EB64D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 26 | 141038B21C19D58F001EB64D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 27 | 141038B41C19D58F001EB64D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 28 | 141038BA1C19EBA9001EB64D /* SwiftCarousel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftCarousel.framework; path = "Pods/../build/Debug-iphoneos/SwiftCarousel.framework"; sourceTree = ""; }; 29 | CF3DF73F18FDB610AA003251 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | E502802C3BDD873E3A399338 /* Pods-Example1.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example1.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example1/Pods-Example1.debug.xcconfig"; sourceTree = ""; }; 31 | F11EA58841831BE61C702C28 /* Pods_Example1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example1.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 141038A21C19D58F001EB64D /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | 141038BB1C19EBA9001EB64D /* SwiftCarousel.framework in Frameworks */, 40 | 38297828DAC367CC8F8C0AD7 /* Pods_Example1.framework in Frameworks */, 41 | ); 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXFrameworksBuildPhase section */ 45 | 46 | /* Begin PBXGroup section */ 47 | 1410389C1C19D58F001EB64D = { 48 | isa = PBXGroup; 49 | children = ( 50 | 141038A71C19D58F001EB64D /* Example1 */, 51 | 141038A61C19D58F001EB64D /* Products */, 52 | EE77590AC7D9E1549AA63F49 /* Frameworks */, 53 | 878E7B663C20A674A00948AB /* Pods */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 141038A61C19D58F001EB64D /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 141038A51C19D58F001EB64D /* Example1.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 141038A71C19D58F001EB64D /* Example1 */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 141038A81C19D58F001EB64D /* AppDelegate.swift */, 69 | 141038AA1C19D58F001EB64D /* ViewController.swift */, 70 | 141038AC1C19D58F001EB64D /* Main.storyboard */, 71 | 141038AF1C19D58F001EB64D /* Assets.xcassets */, 72 | 141038B11C19D58F001EB64D /* LaunchScreen.storyboard */, 73 | 141038B41C19D58F001EB64D /* Info.plist */, 74 | ); 75 | path = Example1; 76 | sourceTree = ""; 77 | }; 78 | 878E7B663C20A674A00948AB /* Pods */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | E502802C3BDD873E3A399338 /* Pods-Example1.debug.xcconfig */, 82 | 0AB4529886D1FE4B00220E92 /* Pods-Example1.release.xcconfig */, 83 | ); 84 | name = Pods; 85 | sourceTree = ""; 86 | }; 87 | EE77590AC7D9E1549AA63F49 /* Frameworks */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 141038BA1C19EBA9001EB64D /* SwiftCarousel.framework */, 91 | CF3DF73F18FDB610AA003251 /* Pods.framework */, 92 | F11EA58841831BE61C702C28 /* Pods_Example1.framework */, 93 | ); 94 | name = Frameworks; 95 | sourceTree = ""; 96 | }; 97 | /* End PBXGroup section */ 98 | 99 | /* Begin PBXNativeTarget section */ 100 | 141038A41C19D58F001EB64D /* Example1 */ = { 101 | isa = PBXNativeTarget; 102 | buildConfigurationList = 141038B71C19D58F001EB64D /* Build configuration list for PBXNativeTarget "Example1" */; 103 | buildPhases = ( 104 | 221D86B4BE232F34380350DF /* [CP] Check Pods Manifest.lock */, 105 | 141038A11C19D58F001EB64D /* Sources */, 106 | 141038A21C19D58F001EB64D /* Frameworks */, 107 | 141038A31C19D58F001EB64D /* Resources */, 108 | 9883EF642EBFD819299EF801 /* [CP] Embed Pods Frameworks */, 109 | 90246AF2157E8184FA55562C /* [CP] Copy Pods Resources */, 110 | ); 111 | buildRules = ( 112 | ); 113 | dependencies = ( 114 | ); 115 | name = Example1; 116 | productName = Example1; 117 | productReference = 141038A51C19D58F001EB64D /* Example1.app */; 118 | productType = "com.apple.product-type.application"; 119 | }; 120 | /* End PBXNativeTarget section */ 121 | 122 | /* Begin PBXProject section */ 123 | 1410389D1C19D58F001EB64D /* Project object */ = { 124 | isa = PBXProject; 125 | attributes = { 126 | LastSwiftUpdateCheck = 0720; 127 | LastUpgradeCheck = 0800; 128 | ORGANIZATIONNAME = "Lukasz Mroz"; 129 | TargetAttributes = { 130 | 141038A41C19D58F001EB64D = { 131 | CreatedOnToolsVersion = 7.2; 132 | LastSwiftMigration = 0800; 133 | }; 134 | }; 135 | }; 136 | buildConfigurationList = 141038A01C19D58F001EB64D /* Build configuration list for PBXProject "Example1" */; 137 | compatibilityVersion = "Xcode 3.2"; 138 | developmentRegion = English; 139 | hasScannedForEncodings = 0; 140 | knownRegions = ( 141 | en, 142 | Base, 143 | ); 144 | mainGroup = 1410389C1C19D58F001EB64D; 145 | productRefGroup = 141038A61C19D58F001EB64D /* Products */; 146 | projectDirPath = ""; 147 | projectRoot = ""; 148 | targets = ( 149 | 141038A41C19D58F001EB64D /* Example1 */, 150 | ); 151 | }; 152 | /* End PBXProject section */ 153 | 154 | /* Begin PBXResourcesBuildPhase section */ 155 | 141038A31C19D58F001EB64D /* Resources */ = { 156 | isa = PBXResourcesBuildPhase; 157 | buildActionMask = 2147483647; 158 | files = ( 159 | 141038B31C19D58F001EB64D /* LaunchScreen.storyboard in Resources */, 160 | 141038B01C19D58F001EB64D /* Assets.xcassets in Resources */, 161 | 141038AE1C19D58F001EB64D /* Main.storyboard in Resources */, 162 | ); 163 | runOnlyForDeploymentPostprocessing = 0; 164 | }; 165 | /* End PBXResourcesBuildPhase section */ 166 | 167 | /* Begin PBXShellScriptBuildPhase section */ 168 | 221D86B4BE232F34380350DF /* [CP] Check Pods Manifest.lock */ = { 169 | isa = PBXShellScriptBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | ); 173 | inputPaths = ( 174 | ); 175 | name = "[CP] Check Pods Manifest.lock"; 176 | outputPaths = ( 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | shellPath = /bin/sh; 180 | 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"; 181 | showEnvVarsInLog = 0; 182 | }; 183 | 90246AF2157E8184FA55562C /* [CP] Copy Pods Resources */ = { 184 | isa = PBXShellScriptBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | inputPaths = ( 189 | ); 190 | name = "[CP] Copy Pods Resources"; 191 | outputPaths = ( 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | shellPath = /bin/sh; 195 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example1/Pods-Example1-resources.sh\"\n"; 196 | showEnvVarsInLog = 0; 197 | }; 198 | 9883EF642EBFD819299EF801 /* [CP] Embed Pods Frameworks */ = { 199 | isa = PBXShellScriptBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | inputPaths = ( 204 | ); 205 | name = "[CP] Embed Pods Frameworks"; 206 | outputPaths = ( 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | shellPath = /bin/sh; 210 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example1/Pods-Example1-frameworks.sh\"\n"; 211 | showEnvVarsInLog = 0; 212 | }; 213 | /* End PBXShellScriptBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | 141038A11C19D58F001EB64D /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 141038AB1C19D58F001EB64D /* ViewController.swift in Sources */, 221 | 141038A91C19D58F001EB64D /* AppDelegate.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXSourcesBuildPhase section */ 226 | 227 | /* Begin PBXVariantGroup section */ 228 | 141038AC1C19D58F001EB64D /* Main.storyboard */ = { 229 | isa = PBXVariantGroup; 230 | children = ( 231 | 141038AD1C19D58F001EB64D /* Base */, 232 | ); 233 | name = Main.storyboard; 234 | sourceTree = ""; 235 | }; 236 | 141038B11C19D58F001EB64D /* LaunchScreen.storyboard */ = { 237 | isa = PBXVariantGroup; 238 | children = ( 239 | 141038B21C19D58F001EB64D /* Base */, 240 | ); 241 | name = LaunchScreen.storyboard; 242 | sourceTree = ""; 243 | }; 244 | /* End PBXVariantGroup section */ 245 | 246 | /* Begin XCBuildConfiguration section */ 247 | 141038B51C19D58F001EB64D /* Debug */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 252 | CLANG_CXX_LIBRARY = "libc++"; 253 | CLANG_ENABLE_MODULES = YES; 254 | CLANG_ENABLE_OBJC_ARC = YES; 255 | CLANG_WARN_BOOL_CONVERSION = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_EMPTY_BODY = YES; 259 | CLANG_WARN_ENUM_CONVERSION = YES; 260 | CLANG_WARN_INFINITE_RECURSION = YES; 261 | CLANG_WARN_INT_CONVERSION = YES; 262 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 263 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 264 | CLANG_WARN_UNREACHABLE_CODE = YES; 265 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 266 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 267 | COPY_PHASE_STRIP = NO; 268 | DEBUG_INFORMATION_FORMAT = dwarf; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | ENABLE_TESTABILITY = YES; 271 | GCC_C_LANGUAGE_STANDARD = gnu99; 272 | GCC_DYNAMIC_NO_PIC = NO; 273 | GCC_NO_COMMON_BLOCKS = YES; 274 | GCC_OPTIMIZATION_LEVEL = 0; 275 | GCC_PREPROCESSOR_DEFINITIONS = ( 276 | "DEBUG=1", 277 | "$(inherited)", 278 | ); 279 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 281 | GCC_WARN_UNDECLARED_SELECTOR = YES; 282 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 283 | GCC_WARN_UNUSED_FUNCTION = YES; 284 | GCC_WARN_UNUSED_VARIABLE = YES; 285 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 286 | MTL_ENABLE_DEBUG_INFO = YES; 287 | ONLY_ACTIVE_ARCH = YES; 288 | SDKROOT = iphoneos; 289 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 290 | }; 291 | name = Debug; 292 | }; 293 | 141038B61C19D58F001EB64D /* Release */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ALWAYS_SEARCH_USER_PATHS = NO; 297 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 298 | CLANG_CXX_LIBRARY = "libc++"; 299 | CLANG_ENABLE_MODULES = YES; 300 | CLANG_ENABLE_OBJC_ARC = YES; 301 | CLANG_WARN_BOOL_CONVERSION = YES; 302 | CLANG_WARN_CONSTANT_CONVERSION = YES; 303 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 304 | CLANG_WARN_EMPTY_BODY = YES; 305 | CLANG_WARN_ENUM_CONVERSION = YES; 306 | CLANG_WARN_INFINITE_RECURSION = YES; 307 | CLANG_WARN_INT_CONVERSION = YES; 308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 309 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 313 | COPY_PHASE_STRIP = NO; 314 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 315 | ENABLE_NS_ASSERTIONS = NO; 316 | ENABLE_STRICT_OBJC_MSGSEND = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu99; 318 | GCC_NO_COMMON_BLOCKS = YES; 319 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 320 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 321 | GCC_WARN_UNDECLARED_SELECTOR = YES; 322 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 323 | GCC_WARN_UNUSED_FUNCTION = YES; 324 | GCC_WARN_UNUSED_VARIABLE = YES; 325 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 326 | MTL_ENABLE_DEBUG_INFO = NO; 327 | SDKROOT = iphoneos; 328 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 329 | VALIDATE_PRODUCT = YES; 330 | }; 331 | name = Release; 332 | }; 333 | 141038B81C19D58F001EB64D /* Debug */ = { 334 | isa = XCBuildConfiguration; 335 | baseConfigurationReference = E502802C3BDD873E3A399338 /* Pods-Example1.debug.xcconfig */; 336 | buildSettings = { 337 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 338 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 339 | CODE_SIGN_IDENTITY = "iPhone Developer"; 340 | FRAMEWORK_SEARCH_PATHS = ( 341 | "$(inherited)", 342 | "$(PROJECT_DIR)/build/Debug-iphoneos", 343 | ); 344 | INFOPLIST_FILE = Example1/Info.plist; 345 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 346 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 347 | PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.swiftcarousel.Example1; 348 | PRODUCT_NAME = "$(TARGET_NAME)"; 349 | SWIFT_VERSION = 3.0; 350 | }; 351 | name = Debug; 352 | }; 353 | 141038B91C19D58F001EB64D /* Release */ = { 354 | isa = XCBuildConfiguration; 355 | baseConfigurationReference = 0AB4529886D1FE4B00220E92 /* Pods-Example1.release.xcconfig */; 356 | buildSettings = { 357 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | CODE_SIGN_IDENTITY = "iPhone Developer"; 360 | FRAMEWORK_SEARCH_PATHS = ( 361 | "$(inherited)", 362 | "$(PROJECT_DIR)/build/Debug-iphoneos", 363 | ); 364 | INFOPLIST_FILE = Example1/Info.plist; 365 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 367 | PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.swiftcarousel.Example1; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | SWIFT_VERSION = 3.0; 370 | }; 371 | name = Release; 372 | }; 373 | /* End XCBuildConfiguration section */ 374 | 375 | /* Begin XCConfigurationList section */ 376 | 141038A01C19D58F001EB64D /* Build configuration list for PBXProject "Example1" */ = { 377 | isa = XCConfigurationList; 378 | buildConfigurations = ( 379 | 141038B51C19D58F001EB64D /* Debug */, 380 | 141038B61C19D58F001EB64D /* Release */, 381 | ); 382 | defaultConfigurationIsVisible = 0; 383 | defaultConfigurationName = Release; 384 | }; 385 | 141038B71C19D58F001EB64D /* Build configuration list for PBXNativeTarget "Example1" */ = { 386 | isa = XCConfigurationList; 387 | buildConfigurations = ( 388 | 141038B81C19D58F001EB64D /* Debug */, 389 | 141038B91C19D58F001EB64D /* Release */, 390 | ); 391 | defaultConfigurationIsVisible = 0; 392 | defaultConfigurationName = Release; 393 | }; 394 | /* End XCConfigurationList section */ 395 | }; 396 | rootObject = 1410389D1C19D58F001EB64D /* Project object */; 397 | } 398 | -------------------------------------------------------------------------------- /Source/SwiftCarousel.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 Droids on Roids LLC 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | import UIKit 24 | fileprivate func < (lhs: T?, rhs: T?) -> Bool { 25 | switch (lhs, rhs) { 26 | case let (l?, r?): 27 | return l < r 28 | case (nil, _?): 29 | return true 30 | default: 31 | return false 32 | } 33 | } 34 | 35 | fileprivate func > (lhs: T?, rhs: T?) -> Bool { 36 | switch (lhs, rhs) { 37 | case let (l?, r?): 38 | return l > r 39 | default: 40 | return rhs < lhs 41 | } 42 | } 43 | 44 | 45 | open class SwiftCarousel: UIView { 46 | //MARK: - Properties 47 | 48 | /// Current target with velocity left 49 | internal var currentVelocityX: CGFloat? 50 | /// Maximum velocity that swipe can reach. 51 | internal var maxVelocity: CGFloat = 100.0 52 | // Bool to know if item has been selected by Tapping 53 | fileprivate var itemSelectedByTap = false 54 | /// Number of items that were set at the start of init. 55 | fileprivate var originalChoicesNumber = 0 56 | /// Items that carousel shows. It is 3x more items than originalChoicesNumber. 57 | fileprivate var choices: [UIView] = [] 58 | /// Main UIScrollView. 59 | fileprivate var scrollView = UIScrollView() 60 | /// Current selected index (between 0 and choices count). 61 | fileprivate var currentSelectedIndex: Int? 62 | /// Current selected index (between 0 and originalChoicesNumber). 63 | fileprivate var currentRealSelectedIndex: Int? 64 | /// Carousel delegate that handles events like didSelect. 65 | open weak var delegate: SwiftCarouselDelegate? 66 | /// Bool to set if by tap on item carousel should select it (scroll to it). 67 | open var selectByTapEnabled = true 68 | /// Scrolling type of carousel. You can constraint scrolling through items. 69 | open var scrollType: SwiftCarouselScroll = .default { 70 | didSet { 71 | if case .max(let number) = scrollType , number <= 0 { 72 | scrollType = .none 73 | } 74 | 75 | switch scrollType { 76 | case .none: 77 | scrollView.isScrollEnabled = false 78 | case .max, .freely, .default: 79 | scrollView.isScrollEnabled = true 80 | } 81 | } 82 | } 83 | 84 | 85 | /// Resize type of the carousel chosen from SwiftCarouselResizeType. 86 | open var resizeType: SwiftCarouselResizeType = .withoutResizing(0.0) { 87 | didSet { 88 | setupViews(choices) 89 | } 90 | } 91 | /// If selected index is < 0, set it as nil. 92 | /// We won't check with count number since it might be set before assigning items. 93 | open var defaultSelectedIndex: Int? { 94 | didSet { 95 | if (defaultSelectedIndex < 0) { 96 | defaultSelectedIndex = nil 97 | } 98 | } 99 | } 100 | /// If there is defaultSelectedIndex and was selected, the variable is true. 101 | /// Otherwise it is not. 102 | open var didSetDefaultIndex: Bool = false 103 | /// Current selected index (calculated by searching through views), 104 | /// It returns index between 0 and originalChoicesNumber. 105 | open var selectedIndex: Int? { 106 | let view = viewAtLocation(CGPoint(x: scrollView.contentOffset.x + scrollView.frame.width / 2.0, y: scrollView.frame.minY)) 107 | guard var index = choices.index(where: { $0 == view }) else { 108 | return nil 109 | } 110 | 111 | while index >= originalChoicesNumber { 112 | index -= originalChoicesNumber 113 | } 114 | 115 | return index 116 | } 117 | /// Current selected index (calculated by searching through views), 118 | /// It returns index between 0 and choices count. 119 | fileprivate var realSelectedIndex: Int? { 120 | let view = viewAtLocation(CGPoint(x: scrollView.contentOffset.x + scrollView.frame.width / 2.0, y: scrollView.frame.minY)) 121 | guard let index = choices.index(where: { $0 == view }) else { 122 | return nil 123 | } 124 | 125 | return index 126 | } 127 | /// Carousel items. You can setup your carousel using this method (static items), or 128 | /// you can also see `itemsFactory`, which uses closure for the setup. 129 | /// Warning: original views are copied internally and are not guaranteed to be complete when the `didSelect` and `didDeselect` delegate methods are called. Use `itemsFactory` instead to avoid this limitation. 130 | open var items: [UIView] { 131 | get { 132 | return [UIView](choices[choices.count / 3..<(choices.count / 3 + originalChoicesNumber)]) 133 | } 134 | set { 135 | originalChoicesNumber = newValue.count 136 | (0..<3).forEach { counter in 137 | let newViews: [UIView] = newValue.map { choice in 138 | // Return original view if middle section 139 | if counter == 1 { 140 | return choice 141 | } else { 142 | do { 143 | return try choice.copyView() 144 | } catch { 145 | fatalError("There was a problem with copying view.") 146 | } 147 | } 148 | } 149 | self.choices.append(contentsOf: newViews) 150 | } 151 | setupViews(choices) 152 | } 153 | } 154 | 155 | /// Factory for carousel items. Here you specify how many items do you want in carousel 156 | /// and you need to specify closure that will create that view. Remember that it should 157 | /// always create new view, not give the same reference all the time. 158 | /// If the factory closure returns a reference to a view that has already been returned, a SwiftCarouselError.ViewAlreadyAdded error is thrown. 159 | /// You can always setup your carousel using `items` instead. 160 | open func itemsFactory(itemsCount count: Int, factory: (_ index: Int) -> UIView) throws { 161 | guard count > 0 else { return } 162 | 163 | originalChoicesNumber = count 164 | try (0..<3).forEach { counter in 165 | let newViews: [UIView] = try stride(from: 0, to: count, by: 1).map { i in 166 | let view = factory(i) 167 | guard !self.choices.contains(view) else { 168 | throw SwiftCarouselError.viewAlreadyAdded 169 | } 170 | return view 171 | } 172 | self.choices.append(contentsOf: newViews) 173 | } 174 | setupViews(choices) 175 | } 176 | 177 | // MARK: - Inits 178 | public override init(frame: CGRect) { 179 | super.init(frame: frame) 180 | setup() 181 | } 182 | 183 | public required init?(coder aDecoder: NSCoder) { 184 | super.init(coder: aDecoder) 185 | setup() 186 | } 187 | 188 | /** 189 | Initialize carousel with items & frame. 190 | 191 | - parameter frame: Carousel frame. 192 | - parameter items: Items to put in carousel. 193 | 194 | Warning: original views in `items` are copied internally and are not guaranteed to be complete when the `didSelect` and `didDeselect` delegate methods are called. Use `itemsFactory` instead to avoid this limitation. 195 | 196 | */ 197 | public convenience init(frame: CGRect, items: [UIView]) { 198 | self.init(frame: frame) 199 | setup() 200 | self.items = items 201 | } 202 | 203 | deinit { 204 | scrollView.removeObserver(self, forKeyPath: "contentOffset") 205 | } 206 | 207 | // MARK: - Setups 208 | 209 | /** 210 | Main setup function. Here should be everything that needs to be done once. 211 | */ 212 | fileprivate func setup() { 213 | scrollView = UIScrollView() 214 | scrollView.delegate = self 215 | scrollView.translatesAutoresizingMaskIntoConstraints = false 216 | scrollView.isScrollEnabled = true 217 | scrollView.showsVerticalScrollIndicator = false 218 | scrollView.showsHorizontalScrollIndicator = false 219 | addSubview(scrollView) 220 | 221 | addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|[scrollView]|", 222 | options: .alignAllCenterX, 223 | metrics: nil, 224 | views: ["scrollView": scrollView]) 225 | ) 226 | addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[scrollView]|", 227 | options: .alignAllCenterY, 228 | metrics: nil, 229 | views: ["scrollView": scrollView]) 230 | ) 231 | 232 | backgroundColor = .clear 233 | scrollView.backgroundColor = .clear 234 | scrollView.addObserver(self, forKeyPath: "contentOffset", options: [.new, .old], context: nil) 235 | 236 | let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(viewTapped(_:))) 237 | gestureRecognizer.cancelsTouchesInView = false 238 | gestureRecognizer.delegate = self 239 | scrollView.addGestureRecognizer(gestureRecognizer) 240 | } 241 | 242 | /** 243 | Setup views. Function that is fired up when setting the resizing type or items array. 244 | 245 | - parameter views: Current items to setup. 246 | */ 247 | fileprivate func setupViews(_ views: [UIView]) { 248 | var x: CGFloat = 0.0 249 | if case .floatWithSpacing(_) = resizeType { 250 | views.forEach { $0.sizeToFit() } 251 | } 252 | 253 | views.forEach { choice in 254 | var additionalSpacing: CGFloat = 0.0 255 | switch resizeType { 256 | case .withoutResizing(let spacing): additionalSpacing = spacing 257 | case .floatWithSpacing(let spacing): additionalSpacing = spacing 258 | case .visibleItemsPerPage(let visibleItems): 259 | choice.frame.size.width = scrollView.frame.width / CGFloat(visibleItems) 260 | if (choice.frame.height > 0.0) { 261 | let aspectRatio: CGFloat = choice.frame.width/choice.frame.height 262 | choice.frame.size.height = floor(choice.frame.width * aspectRatio) > frame.height ? frame.height : floor(choice.frame.width * aspectRatio) 263 | } else { 264 | choice.frame.size.height = frame.height 265 | } 266 | } 267 | choice.frame.origin.x = x 268 | x += choice.frame.width + additionalSpacing 269 | } 270 | 271 | scrollView.subviews.forEach { $0.removeFromSuperview() } 272 | views.forEach { scrollView.addSubview($0) } 273 | layoutIfNeeded() 274 | } 275 | 276 | override open func layoutSubviews() { 277 | super.layoutSubviews() 278 | 279 | guard (scrollView.frame.width > 0 && scrollView.frame.height > 0) else { return } 280 | 281 | var width: CGFloat = 0.0 282 | switch resizeType { 283 | case .floatWithSpacing(_), .withoutResizing(_): 284 | width = choices.last!.frame.maxX 285 | case .visibleItemsPerPage(_): 286 | width = choices.reduce(0.0) { $0 + $1.frame.width } 287 | } 288 | 289 | scrollView.contentSize = CGSize(width: width, height: frame.height) 290 | maxVelocity = scrollView.contentSize.width / 6.0 291 | 292 | // We do not want to change the selected index in case of hiding and 293 | // showing view, which also triggers layout. 294 | // On the other hand this method can be triggered when the defaultSelectedIndex 295 | // was set after the carousel init, so we check if the default index is != nil 296 | // and that it wasn't set before. 297 | guard currentSelectedIndex == nil || 298 | (didSetDefaultIndex == false && defaultSelectedIndex != nil) else { return } 299 | 300 | // Center the view 301 | if defaultSelectedIndex != nil { 302 | selectItem(defaultSelectedIndex!, animated: false) 303 | didSetDefaultIndex = true 304 | } else { 305 | selectItem(0, animated: false) 306 | } 307 | } 308 | 309 | override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { 310 | if let _ = change?[NSKeyValueChangeKey.newKey] , keyPath == "contentOffset" { 311 | // with autolayout this seems to be quite usual, we want to wait 312 | // until we have some size we can actualy work with 313 | guard (scrollView.frame.width > 0 && 314 | scrollView.frame.height > 0) else { return } 315 | 316 | let newOffset = scrollView.contentOffset 317 | let segmentWidth = scrollView.contentSize.width / 3 318 | var newOffsetX: CGFloat! 319 | if (newOffset.x >= segmentWidth * 2.0) { // in the 3rd part 320 | newOffsetX = newOffset.x - segmentWidth // move back one segment 321 | } else if (newOffset.x + scrollView.bounds.width) <= segmentWidth { // First part 322 | newOffsetX = newOffset.x + segmentWidth // move forward one segment 323 | } 324 | // We are in middle segment still so no need to scroll elsewhere 325 | guard newOffsetX != nil && newOffsetX > 0 else { 326 | return 327 | } 328 | 329 | self.scrollView.contentOffset.x = newOffsetX 330 | 331 | self.delegate?.didScroll?(toOffset: self.scrollView.contentOffset) 332 | } 333 | } 334 | 335 | // MARK: - Gestures 336 | open func viewTapped(_ gestureRecognizer: UIGestureRecognizer) { 337 | if selectByTapEnabled { 338 | let touchPoint = gestureRecognizer.location(in: scrollView) 339 | if let view = viewAtLocation(touchPoint), let index = choices.index(of: view) { 340 | itemSelectedByTap = true 341 | selectItem(index, animated: true, force: true) 342 | } 343 | } 344 | } 345 | 346 | // MARK: - Helpers 347 | 348 | /** 349 | Function that should be called when item was selected by Carousel. 350 | It will deselect all items that were selected before, and send 351 | notification to the delegate. 352 | */ 353 | internal func didSelectItem() { 354 | guard let selectedIndex = self.selectedIndex, let realSelectedIndex = self.realSelectedIndex else { 355 | return 356 | } 357 | 358 | didDeselectItem() 359 | delegate?.didSelectItem?(item: choices[realSelectedIndex], index: selectedIndex, tapped: itemSelectedByTap) 360 | itemSelectedByTap = false 361 | currentSelectedIndex = selectedIndex 362 | currentRealSelectedIndex = realSelectedIndex 363 | currentVelocityX = nil 364 | scrollView.isScrollEnabled = true 365 | } 366 | 367 | /** 368 | Function that should be called when item was deselected by Carousel. 369 | It will also send notification to the delegate. 370 | */ 371 | internal func didDeselectItem() { 372 | guard let currentRealSelectedIndex = self.currentRealSelectedIndex, let currentSelectedIndex = self.currentSelectedIndex else { 373 | return 374 | } 375 | 376 | delegate?.didDeselectItem?(item: choices[currentRealSelectedIndex], index: currentSelectedIndex) 377 | } 378 | 379 | /** 380 | Detects if new point to scroll to will change the part (from the 3 parts used by Carousel). 381 | First and third parts are not shown to the end user, we are managing the scrolling between 382 | them behind the stage. The second part is the part user thinks it sees. 383 | 384 | - parameter point: Destination point. 385 | 386 | - returns: Bool that says if the part will change. 387 | */ 388 | fileprivate func willChangePart(_ point: CGPoint) -> Bool { 389 | if (point.x >= scrollView.contentSize.width * 2.0 / 3.0 || 390 | point.x <= scrollView.contentSize.width / 3.0) { 391 | return true 392 | } 393 | 394 | return false 395 | } 396 | 397 | /** 398 | Get view (from the items array) at location (if it exists). 399 | 400 | - parameter touchLocation: Location point. 401 | 402 | - returns: UIView that contains that point (if it exists). 403 | */ 404 | fileprivate func viewAtLocation(_ touchLocation: CGPoint) -> UIView? { 405 | for subview in scrollView.subviews where subview.frame.contains(touchLocation) { 406 | return subview 407 | } 408 | 409 | return nil 410 | } 411 | 412 | /** 413 | Get nearest view to the specified point location. 414 | 415 | - parameter touchLocation: Location point. 416 | 417 | - returns: UIView that is the nearest to that point (or contains that point). 418 | */ 419 | internal func nearestViewAtLocation(_ touchLocation: CGPoint) -> UIView { 420 | var view: UIView! 421 | if let newView = viewAtLocation(touchLocation) { 422 | view = newView 423 | } else { 424 | // Now check left and right margins to nearest views 425 | var step: CGFloat = 1.0 426 | 427 | switch resizeType { 428 | case .floatWithSpacing(let spacing): 429 | step = spacing 430 | case .withoutResizing(let spacing): 431 | step = spacing 432 | default: 433 | break 434 | } 435 | 436 | var targetX = touchLocation.x 437 | 438 | // Left 439 | var leftView: UIView? 440 | 441 | repeat { 442 | targetX -= step 443 | leftView = viewAtLocation(CGPoint(x: targetX, y: touchLocation.y)) 444 | } while (leftView == nil) 445 | 446 | let leftMargin = touchLocation.x - leftView!.frame.maxX 447 | 448 | // Right 449 | var rightView: UIView? 450 | 451 | repeat { 452 | targetX += step 453 | rightView = viewAtLocation(CGPoint(x: targetX, y: touchLocation.y)) 454 | } while (rightView == nil) 455 | 456 | let rightMargin = rightView!.frame.minX - touchLocation.x 457 | 458 | if rightMargin < leftMargin { 459 | 460 | view = rightView! 461 | } else { 462 | view = leftView! 463 | } 464 | } 465 | 466 | // Check if the view is in bounds of scrolling type 467 | if case .max(let maxItems) = scrollType, 468 | let currentRealSelectedIndex = currentRealSelectedIndex, 469 | var newIndex = choices.index (where: { $0 == view }) { 470 | 471 | if UInt(abs(newIndex - currentRealSelectedIndex)) > maxItems { 472 | if newIndex > currentRealSelectedIndex { 473 | newIndex = currentRealSelectedIndex + Int(maxItems) 474 | } else { 475 | newIndex = currentRealSelectedIndex - Int(maxItems) 476 | } 477 | } 478 | 479 | while newIndex < 0 { 480 | newIndex += originalChoicesNumber 481 | } 482 | 483 | while newIndex > choices.count { 484 | newIndex -= originalChoicesNumber 485 | } 486 | 487 | view = choices[newIndex] 488 | } 489 | 490 | return view 491 | } 492 | 493 | /** 494 | Select item in the Carousel. 495 | 496 | - parameter choice: Item index to select. If it contains number > than originalChoicesNumber, 497 | you need to set `force` flag to true. 498 | - parameter animated: If the method should try to animate the selection. 499 | - parameter force: Force should be set to true if choice index is out of items bounds. 500 | */ 501 | fileprivate func selectItem(_ choice: Int, animated: Bool, force: Bool) { 502 | var index = choice 503 | if !force { 504 | // allow scroll only in the range of original items 505 | guard choice < choices.count / 3 else { 506 | return 507 | } 508 | // move to same item in middle segment 509 | index = index + originalChoicesNumber 510 | } 511 | 512 | let choiceView = choices[index] 513 | let x = choiceView.center.x - scrollView.frame.width / 2.0 514 | 515 | let newPosition = CGPoint(x: x, y: scrollView.contentOffset.y) 516 | let animationIsNotNeeded = newPosition.equalTo(scrollView.contentOffset) 517 | scrollView.setContentOffset(newPosition, animated: animated) 518 | 519 | if !animated || animationIsNotNeeded { 520 | didSelectItem() 521 | } 522 | } 523 | 524 | /** 525 | Select item in the Carousel. 526 | 527 | - parameter choice: Item index to select. 528 | - parameter animated: Bool to tell if the selection should be animated. 529 | 530 | */ 531 | open func selectItem(_ choice: Int, animated: Bool) { 532 | selectItem(choice, animated: animated, force: false) 533 | } 534 | } 535 | -------------------------------------------------------------------------------- /Examples/Example1/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 072EA61F05AE792337B0A2B07B686696 /* Pods-Example1-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AA852178F6A07E1BE72DE706C3DC6D10 /* Pods-Example1-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 0E46A60DB4086D1B9FEA29CECB29675F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7EC994CDC2D681BA26389F78A7E4B325 /* UIKit.framework */; }; 12 | 1B0C37CEDAD5103A518697A2C2B9AD41 /* Pods-Example1-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A7B69DB0D82CBD421583FBA8FEA42A /* Pods-Example1-dummy.m */; }; 13 | 321CC448591056C0A6DE9C2AEE50FCF9 /* SwiftCarousel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F295B1A64C10456F584077CBF877CBD /* SwiftCarousel-dummy.m */; }; 14 | 5E0D75DE6CB04FE2EEAE1FE9188BA7F9 /* SwiftCarousel+UIScrollViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DEF4F82C6265E740F0D7A40F330916E /* SwiftCarousel+UIScrollViewDelegate.swift */; }; 15 | 7A57F847A61715D577543A1F378CBB6A /* UIView+SwiftCarousel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87268316C174203A4F8D48EF55ABA22 /* UIView+SwiftCarousel.swift */; }; 16 | 7DF4D0F503771189871141F9DC17731A /* SwiftCarouselDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 102EAB13631CBED23AB4DC56FD104FB4 /* SwiftCarouselDelegate.swift */; }; 17 | 804354DF3D7CF38B07D4E0087E5C9616 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 616BEB51ECCAD129BDBCB7A956B56CC6 /* Foundation.framework */; }; 18 | 8272C4D58DE7D8FFCC3D9AB1197E0139 /* SwiftCarousel+UIGestureRecognizerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92637D30A5034BCD9642482FA92286B4 /* SwiftCarousel+UIGestureRecognizerDelegate.swift */; }; 19 | B1D895FE6C681537C7E00997D6579A33 /* SwiftCarouselError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02F6E3E777DD1B2273E773BFAAEF5EC8 /* SwiftCarouselError.swift */; }; 20 | B5998E82D058F14F0D505077CBB41DCE /* SwiftCarouselScroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A18A606CAE74B64DD2D931682A1A47 /* SwiftCarouselScroll.swift */; }; 21 | D6F8BFD0914FF571191917DF6AC75163 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 616BEB51ECCAD129BDBCB7A956B56CC6 /* Foundation.framework */; }; 22 | E5B837381FE9367C9CEFA5323EF4BB7F /* SwiftCarousel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 362CCE6231C3BDD1DB2F9255DE3196C7 /* SwiftCarousel.swift */; }; 23 | EBCADD68B8A027B0A2FBBFDABFFC5C00 /* SwiftCarouselResizeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73E613D81534B824561A9938F2AF3004 /* SwiftCarouselResizeType.swift */; }; 24 | FEB1B63E5A8F245B577A4D81D9CCC434 /* SwiftCarousel-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A43A2E24EACE433062A6887E3002D94 /* SwiftCarousel-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | ACE2A168CBA8BC585256A556A120FC61 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 71BE412C6E2BE0AAA35D186E4A456670; 33 | remoteInfo = SwiftCarousel; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 02F6E3E777DD1B2273E773BFAAEF5EC8 /* SwiftCarouselError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftCarouselError.swift; sourceTree = ""; }; 39 | 05F06FA9C3E27D4D5F9A5E0580D6D3D5 /* Pods-Example1-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example1-acknowledgements.markdown"; sourceTree = ""; }; 40 | 102EAB13631CBED23AB4DC56FD104FB4 /* SwiftCarouselDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftCarouselDelegate.swift; sourceTree = ""; }; 41 | 24A57A5257E057496CF8952ED24191E7 /* Pods-Example1.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example1.release.xcconfig"; sourceTree = ""; }; 42 | 2DEF4F82C6265E740F0D7A40F330916E /* SwiftCarousel+UIScrollViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "SwiftCarousel+UIScrollViewDelegate.swift"; sourceTree = ""; }; 43 | 35A7B69DB0D82CBD421583FBA8FEA42A /* Pods-Example1-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example1-dummy.m"; sourceTree = ""; }; 44 | 362CCE6231C3BDD1DB2F9255DE3196C7 /* SwiftCarousel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftCarousel.swift; sourceTree = ""; }; 45 | 4A43A2E24EACE433062A6887E3002D94 /* SwiftCarousel-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftCarousel-umbrella.h"; sourceTree = ""; }; 46 | 4FAAC941D3D2691960BAA5073EA2357C /* Pods-Example1-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example1-frameworks.sh"; sourceTree = ""; }; 47 | 616BEB51ECCAD129BDBCB7A956B56CC6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 48 | 656D7C5CC0F2A5CDCDDA88D097EAA350 /* Pods-Example1-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example1-acknowledgements.plist"; sourceTree = ""; }; 49 | 73E613D81534B824561A9938F2AF3004 /* SwiftCarouselResizeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftCarouselResizeType.swift; sourceTree = ""; }; 50 | 7533F7C9B55F97A0EC93B1CE9D959B9F /* SwiftCarousel.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = SwiftCarousel.modulemap; sourceTree = ""; }; 51 | 7E93C3C2CE9AB9872375854870856173 /* Pods-Example1-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Example1-resources.sh"; sourceTree = ""; }; 52 | 7EC994CDC2D681BA26389F78A7E4B325 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 53 | 81A18A606CAE74B64DD2D931682A1A47 /* SwiftCarouselScroll.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SwiftCarouselScroll.swift; sourceTree = ""; }; 54 | 92637D30A5034BCD9642482FA92286B4 /* SwiftCarousel+UIGestureRecognizerDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "SwiftCarousel+UIGestureRecognizerDelegate.swift"; sourceTree = ""; }; 55 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 56 | 95657EF667276E7492B1BF21820F798C /* SwiftCarousel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftCarousel-prefix.pch"; sourceTree = ""; }; 57 | 99BB4D965EF19E2ED3C17CC1301369B6 /* Pods_Example1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Example1.framework; path = "Pods-Example1.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 9F295B1A64C10456F584077CBF877CBD /* SwiftCarousel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftCarousel-dummy.m"; sourceTree = ""; }; 59 | A5F8017CA04D40ADBB1287E200956C5E /* SwiftCarousel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftCarousel.framework; path = SwiftCarousel.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | A7807FC7D87CC00317CE9A3EAD5E9B88 /* Pods-Example1.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example1.debug.xcconfig"; sourceTree = ""; }; 61 | AA852178F6A07E1BE72DE706C3DC6D10 /* Pods-Example1-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example1-umbrella.h"; sourceTree = ""; }; 62 | BF50DF39BFE36183A1D9E555C9A6E96F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | C1717C1E035678316A5372360A99EF0D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | D0B6C80668EAA4A1BDFF027CB99606C8 /* Pods-Example1.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Example1.modulemap"; sourceTree = ""; }; 65 | E87268316C174203A4F8D48EF55ABA22 /* UIView+SwiftCarousel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+SwiftCarousel.swift"; sourceTree = ""; }; 66 | F3F068CB85BF1939D515EDC6DF5D9A5E /* SwiftCarousel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftCarousel.xcconfig; sourceTree = ""; }; 67 | /* End PBXFileReference section */ 68 | 69 | /* Begin PBXFrameworksBuildPhase section */ 70 | C3916300E6E7A56F63F429BB0585C947 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | 804354DF3D7CF38B07D4E0087E5C9616 /* Foundation.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | EE06137916E61D023B6CFCFCDEA6EE49 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | D6F8BFD0914FF571191917DF6AC75163 /* Foundation.framework in Frameworks */, 83 | 0E46A60DB4086D1B9FEA29CECB29675F /* UIKit.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 2BD9D9CE3D3276D26EC5D7518B6ABE4C /* Source */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 362CCE6231C3BDD1DB2F9255DE3196C7 /* SwiftCarousel.swift */, 94 | 92637D30A5034BCD9642482FA92286B4 /* SwiftCarousel+UIGestureRecognizerDelegate.swift */, 95 | 2DEF4F82C6265E740F0D7A40F330916E /* SwiftCarousel+UIScrollViewDelegate.swift */, 96 | 102EAB13631CBED23AB4DC56FD104FB4 /* SwiftCarouselDelegate.swift */, 97 | 02F6E3E777DD1B2273E773BFAAEF5EC8 /* SwiftCarouselError.swift */, 98 | 73E613D81534B824561A9938F2AF3004 /* SwiftCarouselResizeType.swift */, 99 | 81A18A606CAE74B64DD2D931682A1A47 /* SwiftCarouselScroll.swift */, 100 | E87268316C174203A4F8D48EF55ABA22 /* UIView+SwiftCarousel.swift */, 101 | ); 102 | name = Source; 103 | path = Source; 104 | sourceTree = ""; 105 | }; 106 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | E6EE98446B568159EE277B68FD442AF0 /* iOS */, 110 | ); 111 | name = Frameworks; 112 | sourceTree = ""; 113 | }; 114 | 447DF8156DDBAE5B6691C7C159D66739 /* Development Pods */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | E0D0F084FE168BA51B1F07B6E68FCD15 /* SwiftCarousel */, 118 | ); 119 | name = "Development Pods"; 120 | sourceTree = ""; 121 | }; 122 | 5DEE3FF82BEC3EB061DA8A193FD8D4E4 /* Products */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 99BB4D965EF19E2ED3C17CC1301369B6 /* Pods_Example1.framework */, 126 | A5F8017CA04D40ADBB1287E200956C5E /* SwiftCarousel.framework */, 127 | ); 128 | name = Products; 129 | sourceTree = ""; 130 | }; 131 | 7DB346D0F39D3F0E887471402A8071AB = { 132 | isa = PBXGroup; 133 | children = ( 134 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 135 | 447DF8156DDBAE5B6691C7C159D66739 /* Development Pods */, 136 | 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, 137 | 5DEE3FF82BEC3EB061DA8A193FD8D4E4 /* Products */, 138 | DD849FD42429C92323961D4649559A3B /* Targets Support Files */, 139 | ); 140 | sourceTree = ""; 141 | }; 142 | 9B309AEFB9DA726F2E9F2A801790A059 /* Support Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | C1717C1E035678316A5372360A99EF0D /* Info.plist */, 146 | 7533F7C9B55F97A0EC93B1CE9D959B9F /* SwiftCarousel.modulemap */, 147 | F3F068CB85BF1939D515EDC6DF5D9A5E /* SwiftCarousel.xcconfig */, 148 | 9F295B1A64C10456F584077CBF877CBD /* SwiftCarousel-dummy.m */, 149 | 95657EF667276E7492B1BF21820F798C /* SwiftCarousel-prefix.pch */, 150 | 4A43A2E24EACE433062A6887E3002D94 /* SwiftCarousel-umbrella.h */, 151 | ); 152 | name = "Support Files"; 153 | path = "Examples/Example1/Pods/Target Support Files/SwiftCarousel"; 154 | sourceTree = ""; 155 | }; 156 | DD849FD42429C92323961D4649559A3B /* Targets Support Files */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | DF64EFD21CBEA08BD482770802F524A1 /* Pods-Example1 */, 160 | ); 161 | name = "Targets Support Files"; 162 | sourceTree = ""; 163 | }; 164 | DF64EFD21CBEA08BD482770802F524A1 /* Pods-Example1 */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | BF50DF39BFE36183A1D9E555C9A6E96F /* Info.plist */, 168 | D0B6C80668EAA4A1BDFF027CB99606C8 /* Pods-Example1.modulemap */, 169 | 05F06FA9C3E27D4D5F9A5E0580D6D3D5 /* Pods-Example1-acknowledgements.markdown */, 170 | 656D7C5CC0F2A5CDCDDA88D097EAA350 /* Pods-Example1-acknowledgements.plist */, 171 | 35A7B69DB0D82CBD421583FBA8FEA42A /* Pods-Example1-dummy.m */, 172 | 4FAAC941D3D2691960BAA5073EA2357C /* Pods-Example1-frameworks.sh */, 173 | 7E93C3C2CE9AB9872375854870856173 /* Pods-Example1-resources.sh */, 174 | AA852178F6A07E1BE72DE706C3DC6D10 /* Pods-Example1-umbrella.h */, 175 | A7807FC7D87CC00317CE9A3EAD5E9B88 /* Pods-Example1.debug.xcconfig */, 176 | 24A57A5257E057496CF8952ED24191E7 /* Pods-Example1.release.xcconfig */, 177 | ); 178 | name = "Pods-Example1"; 179 | path = "Target Support Files/Pods-Example1"; 180 | sourceTree = ""; 181 | }; 182 | E0D0F084FE168BA51B1F07B6E68FCD15 /* SwiftCarousel */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 2BD9D9CE3D3276D26EC5D7518B6ABE4C /* Source */, 186 | 9B309AEFB9DA726F2E9F2A801790A059 /* Support Files */, 187 | ); 188 | name = SwiftCarousel; 189 | path = ../../..; 190 | sourceTree = ""; 191 | }; 192 | E6EE98446B568159EE277B68FD442AF0 /* iOS */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | 616BEB51ECCAD129BDBCB7A956B56CC6 /* Foundation.framework */, 196 | 7EC994CDC2D681BA26389F78A7E4B325 /* UIKit.framework */, 197 | ); 198 | name = iOS; 199 | sourceTree = ""; 200 | }; 201 | /* End PBXGroup section */ 202 | 203 | /* Begin PBXHeadersBuildPhase section */ 204 | 0134BE548008BBC780B456F15611B0EF /* Headers */ = { 205 | isa = PBXHeadersBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | FEB1B63E5A8F245B577A4D81D9CCC434 /* SwiftCarousel-umbrella.h in Headers */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | 9465499B83BED6859A4F64550086F4D6 /* Headers */ = { 213 | isa = PBXHeadersBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | 072EA61F05AE792337B0A2B07B686696 /* Pods-Example1-umbrella.h in Headers */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXHeadersBuildPhase section */ 221 | 222 | /* Begin PBXNativeTarget section */ 223 | 1BFE71560EAC1F2DD1B6829B502A5C55 /* Pods-Example1 */ = { 224 | isa = PBXNativeTarget; 225 | buildConfigurationList = 6CC2B3ECB76ACFE58CA5AD5FE835898F /* Build configuration list for PBXNativeTarget "Pods-Example1" */; 226 | buildPhases = ( 227 | AB1BDFB7A70E9BEA4FDA96785340A86B /* Sources */, 228 | C3916300E6E7A56F63F429BB0585C947 /* Frameworks */, 229 | 9465499B83BED6859A4F64550086F4D6 /* Headers */, 230 | ); 231 | buildRules = ( 232 | ); 233 | dependencies = ( 234 | 17313D09AF540CC3CAE950BDAA7273B2 /* PBXTargetDependency */, 235 | ); 236 | name = "Pods-Example1"; 237 | productName = "Pods-Example1"; 238 | productReference = 99BB4D965EF19E2ED3C17CC1301369B6 /* Pods_Example1.framework */; 239 | productType = "com.apple.product-type.framework"; 240 | }; 241 | 71BE412C6E2BE0AAA35D186E4A456670 /* SwiftCarousel */ = { 242 | isa = PBXNativeTarget; 243 | buildConfigurationList = 0D0FB63ABA02E77229FA4B3897E6EA39 /* Build configuration list for PBXNativeTarget "SwiftCarousel" */; 244 | buildPhases = ( 245 | 4973B07E2269DAE5FDA8406B5F007D26 /* Sources */, 246 | EE06137916E61D023B6CFCFCDEA6EE49 /* Frameworks */, 247 | 0134BE548008BBC780B456F15611B0EF /* Headers */, 248 | ); 249 | buildRules = ( 250 | ); 251 | dependencies = ( 252 | ); 253 | name = SwiftCarousel; 254 | productName = SwiftCarousel; 255 | productReference = A5F8017CA04D40ADBB1287E200956C5E /* SwiftCarousel.framework */; 256 | productType = "com.apple.product-type.framework"; 257 | }; 258 | /* End PBXNativeTarget section */ 259 | 260 | /* Begin PBXProject section */ 261 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 262 | isa = PBXProject; 263 | attributes = { 264 | LastSwiftUpdateCheck = 0730; 265 | LastUpgradeCheck = 0700; 266 | }; 267 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 268 | compatibilityVersion = "Xcode 3.2"; 269 | developmentRegion = English; 270 | hasScannedForEncodings = 0; 271 | knownRegions = ( 272 | en, 273 | ); 274 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 275 | productRefGroup = 5DEE3FF82BEC3EB061DA8A193FD8D4E4 /* Products */; 276 | projectDirPath = ""; 277 | projectRoot = ""; 278 | targets = ( 279 | 1BFE71560EAC1F2DD1B6829B502A5C55 /* Pods-Example1 */, 280 | 71BE412C6E2BE0AAA35D186E4A456670 /* SwiftCarousel */, 281 | ); 282 | }; 283 | /* End PBXProject section */ 284 | 285 | /* Begin PBXSourcesBuildPhase section */ 286 | 4973B07E2269DAE5FDA8406B5F007D26 /* Sources */ = { 287 | isa = PBXSourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | 8272C4D58DE7D8FFCC3D9AB1197E0139 /* SwiftCarousel+UIGestureRecognizerDelegate.swift in Sources */, 291 | 5E0D75DE6CB04FE2EEAE1FE9188BA7F9 /* SwiftCarousel+UIScrollViewDelegate.swift in Sources */, 292 | 321CC448591056C0A6DE9C2AEE50FCF9 /* SwiftCarousel-dummy.m in Sources */, 293 | E5B837381FE9367C9CEFA5323EF4BB7F /* SwiftCarousel.swift in Sources */, 294 | 7DF4D0F503771189871141F9DC17731A /* SwiftCarouselDelegate.swift in Sources */, 295 | B1D895FE6C681537C7E00997D6579A33 /* SwiftCarouselError.swift in Sources */, 296 | EBCADD68B8A027B0A2FBBFDABFFC5C00 /* SwiftCarouselResizeType.swift in Sources */, 297 | B5998E82D058F14F0D505077CBB41DCE /* SwiftCarouselScroll.swift in Sources */, 298 | 7A57F847A61715D577543A1F378CBB6A /* UIView+SwiftCarousel.swift in Sources */, 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | }; 302 | AB1BDFB7A70E9BEA4FDA96785340A86B /* Sources */ = { 303 | isa = PBXSourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 1B0C37CEDAD5103A518697A2C2B9AD41 /* Pods-Example1-dummy.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXTargetDependency section */ 313 | 17313D09AF540CC3CAE950BDAA7273B2 /* PBXTargetDependency */ = { 314 | isa = PBXTargetDependency; 315 | name = SwiftCarousel; 316 | target = 71BE412C6E2BE0AAA35D186E4A456670 /* SwiftCarousel */; 317 | targetProxy = ACE2A168CBA8BC585256A556A120FC61 /* PBXContainerItemProxy */; 318 | }; 319 | /* End PBXTargetDependency section */ 320 | 321 | /* Begin XCBuildConfiguration section */ 322 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_ANALYZER_NONNULL = YES; 327 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 328 | CLANG_CXX_LIBRARY = "libc++"; 329 | CLANG_ENABLE_MODULES = YES; 330 | CLANG_ENABLE_OBJC_ARC = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 334 | CLANG_WARN_EMPTY_BODY = YES; 335 | CLANG_WARN_ENUM_CONVERSION = YES; 336 | CLANG_WARN_INT_CONVERSION = YES; 337 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 338 | CLANG_WARN_UNREACHABLE_CODE = YES; 339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 340 | CODE_SIGNING_REQUIRED = NO; 341 | COPY_PHASE_STRIP = NO; 342 | ENABLE_TESTABILITY = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_OPTIMIZATION_LEVEL = 0; 346 | GCC_PREPROCESSOR_DEFINITIONS = ( 347 | "POD_CONFIGURATION_DEBUG=1", 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 359 | ONLY_ACTIVE_ARCH = YES; 360 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 361 | STRIP_INSTALLED_PRODUCT = NO; 362 | SYMROOT = "${SRCROOT}/../build"; 363 | }; 364 | name = Debug; 365 | }; 366 | 070620EE1C243B9762144F452A44B87F /* Release */ = { 367 | isa = XCBuildConfiguration; 368 | baseConfigurationReference = 24A57A5257E057496CF8952ED24191E7 /* Pods-Example1.release.xcconfig */; 369 | buildSettings = { 370 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 372 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 373 | CURRENT_PROJECT_VERSION = 1; 374 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 375 | DEFINES_MODULE = YES; 376 | DYLIB_COMPATIBILITY_VERSION = 1; 377 | DYLIB_CURRENT_VERSION = 1; 378 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 379 | ENABLE_STRICT_OBJC_MSGSEND = YES; 380 | GCC_NO_COMMON_BLOCKS = YES; 381 | INFOPLIST_FILE = "Target Support Files/Pods-Example1/Info.plist"; 382 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 383 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 384 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 385 | MACH_O_TYPE = staticlib; 386 | MODULEMAP_FILE = "Target Support Files/Pods-Example1/Pods-Example1.modulemap"; 387 | MTL_ENABLE_DEBUG_INFO = NO; 388 | OTHER_LDFLAGS = ""; 389 | OTHER_LIBTOOLFLAGS = ""; 390 | PODS_ROOT = "$(SRCROOT)"; 391 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 392 | PRODUCT_NAME = Pods_Example1; 393 | SDKROOT = iphoneos; 394 | SKIP_INSTALL = YES; 395 | TARGETED_DEVICE_FAMILY = "1,2"; 396 | VERSIONING_SYSTEM = "apple-generic"; 397 | VERSION_INFO_PREFIX = ""; 398 | }; 399 | name = Release; 400 | }; 401 | 373D8EC2139363B99A082FE275F910AF /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = F3F068CB85BF1939D515EDC6DF5D9A5E /* SwiftCarousel.xcconfig */; 404 | buildSettings = { 405 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 406 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 407 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 408 | CURRENT_PROJECT_VERSION = 1; 409 | DEBUG_INFORMATION_FORMAT = dwarf; 410 | DEFINES_MODULE = YES; 411 | DYLIB_COMPATIBILITY_VERSION = 1; 412 | DYLIB_CURRENT_VERSION = 1; 413 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 414 | ENABLE_STRICT_OBJC_MSGSEND = YES; 415 | ENABLE_TESTABILITY = YES; 416 | GCC_NO_COMMON_BLOCKS = YES; 417 | GCC_PREFIX_HEADER = "Target Support Files/SwiftCarousel/SwiftCarousel-prefix.pch"; 418 | INFOPLIST_FILE = "Target Support Files/SwiftCarousel/Info.plist"; 419 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 420 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 421 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 422 | MODULEMAP_FILE = "Target Support Files/SwiftCarousel/SwiftCarousel.modulemap"; 423 | MTL_ENABLE_DEBUG_INFO = YES; 424 | PRODUCT_NAME = SwiftCarousel; 425 | SDKROOT = iphoneos; 426 | SKIP_INSTALL = YES; 427 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 428 | SWIFT_VERSION = 3.0; 429 | TARGETED_DEVICE_FAMILY = "1,2"; 430 | VERSIONING_SYSTEM = "apple-generic"; 431 | VERSION_INFO_PREFIX = ""; 432 | }; 433 | name = Debug; 434 | }; 435 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { 436 | isa = XCBuildConfiguration; 437 | buildSettings = { 438 | ALWAYS_SEARCH_USER_PATHS = NO; 439 | CLANG_ANALYZER_NONNULL = YES; 440 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 441 | CLANG_CXX_LIBRARY = "libc++"; 442 | CLANG_ENABLE_MODULES = YES; 443 | CLANG_ENABLE_OBJC_ARC = YES; 444 | CLANG_WARN_BOOL_CONVERSION = YES; 445 | CLANG_WARN_CONSTANT_CONVERSION = YES; 446 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 447 | CLANG_WARN_EMPTY_BODY = YES; 448 | CLANG_WARN_ENUM_CONVERSION = YES; 449 | CLANG_WARN_INT_CONVERSION = YES; 450 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 451 | CLANG_WARN_UNREACHABLE_CODE = YES; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | CODE_SIGNING_REQUIRED = NO; 454 | COPY_PHASE_STRIP = YES; 455 | ENABLE_NS_ASSERTIONS = NO; 456 | GCC_C_LANGUAGE_STANDARD = gnu99; 457 | GCC_PREPROCESSOR_DEFINITIONS = ( 458 | "POD_CONFIGURATION_RELEASE=1", 459 | "$(inherited)", 460 | ); 461 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 462 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 463 | GCC_WARN_UNDECLARED_SELECTOR = YES; 464 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 465 | GCC_WARN_UNUSED_FUNCTION = YES; 466 | GCC_WARN_UNUSED_VARIABLE = YES; 467 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 468 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 469 | STRIP_INSTALLED_PRODUCT = NO; 470 | SYMROOT = "${SRCROOT}/../build"; 471 | VALIDATE_PRODUCT = YES; 472 | }; 473 | name = Release; 474 | }; 475 | 9C72B78191D9A1B9C85E0BB53184E5CB /* Debug */ = { 476 | isa = XCBuildConfiguration; 477 | baseConfigurationReference = A7807FC7D87CC00317CE9A3EAD5E9B88 /* Pods-Example1.debug.xcconfig */; 478 | buildSettings = { 479 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 480 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 481 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 482 | CURRENT_PROJECT_VERSION = 1; 483 | DEBUG_INFORMATION_FORMAT = dwarf; 484 | DEFINES_MODULE = YES; 485 | DYLIB_COMPATIBILITY_VERSION = 1; 486 | DYLIB_CURRENT_VERSION = 1; 487 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 488 | ENABLE_STRICT_OBJC_MSGSEND = YES; 489 | ENABLE_TESTABILITY = YES; 490 | GCC_NO_COMMON_BLOCKS = YES; 491 | INFOPLIST_FILE = "Target Support Files/Pods-Example1/Info.plist"; 492 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 493 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 495 | MACH_O_TYPE = staticlib; 496 | MODULEMAP_FILE = "Target Support Files/Pods-Example1/Pods-Example1.modulemap"; 497 | MTL_ENABLE_DEBUG_INFO = YES; 498 | OTHER_LDFLAGS = ""; 499 | OTHER_LIBTOOLFLAGS = ""; 500 | PODS_ROOT = "$(SRCROOT)"; 501 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 502 | PRODUCT_NAME = Pods_Example1; 503 | SDKROOT = iphoneos; 504 | SKIP_INSTALL = YES; 505 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 506 | SWIFT_VERSION = 3.0; 507 | TARGETED_DEVICE_FAMILY = "1,2"; 508 | VERSIONING_SYSTEM = "apple-generic"; 509 | VERSION_INFO_PREFIX = ""; 510 | }; 511 | name = Debug; 512 | }; 513 | B4E6787D8B7A19E0CCB0807784085F51 /* Release */ = { 514 | isa = XCBuildConfiguration; 515 | baseConfigurationReference = F3F068CB85BF1939D515EDC6DF5D9A5E /* SwiftCarousel.xcconfig */; 516 | buildSettings = { 517 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 518 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 519 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 520 | CURRENT_PROJECT_VERSION = 1; 521 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 522 | DEFINES_MODULE = YES; 523 | DYLIB_COMPATIBILITY_VERSION = 1; 524 | DYLIB_CURRENT_VERSION = 1; 525 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_NO_COMMON_BLOCKS = YES; 528 | GCC_PREFIX_HEADER = "Target Support Files/SwiftCarousel/SwiftCarousel-prefix.pch"; 529 | INFOPLIST_FILE = "Target Support Files/SwiftCarousel/Info.plist"; 530 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 531 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 533 | MODULEMAP_FILE = "Target Support Files/SwiftCarousel/SwiftCarousel.modulemap"; 534 | MTL_ENABLE_DEBUG_INFO = NO; 535 | PRODUCT_NAME = SwiftCarousel; 536 | SDKROOT = iphoneos; 537 | SKIP_INSTALL = YES; 538 | SWIFT_VERSION = 3.0; 539 | TARGETED_DEVICE_FAMILY = "1,2"; 540 | VERSIONING_SYSTEM = "apple-generic"; 541 | VERSION_INFO_PREFIX = ""; 542 | }; 543 | name = Release; 544 | }; 545 | /* End XCBuildConfiguration section */ 546 | 547 | /* Begin XCConfigurationList section */ 548 | 0D0FB63ABA02E77229FA4B3897E6EA39 /* Build configuration list for PBXNativeTarget "SwiftCarousel" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 373D8EC2139363B99A082FE275F910AF /* Debug */, 552 | B4E6787D8B7A19E0CCB0807784085F51 /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, 561 | 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | 6CC2B3ECB76ACFE58CA5AD5FE835898F /* Build configuration list for PBXNativeTarget "Pods-Example1" */ = { 567 | isa = XCConfigurationList; 568 | buildConfigurations = ( 569 | 9C72B78191D9A1B9C85E0BB53184E5CB /* Debug */, 570 | 070620EE1C243B9762144F452A44B87F /* Release */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | /* End XCConfigurationList section */ 576 | }; 577 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 578 | } 579 | --------------------------------------------------------------------------------