├── .gitignore ├── .swift-version ├── .travis.yml ├── CPCollectionViewLayout-BottomCenter.gif ├── CPCollectionViewLayout-LeftBottom.gif ├── CPCollectionViewLayout-LeftCenter.gif ├── CPCollectionViewLayout-TopCenter.gif ├── CPCollectionViewWheelLayoutSwift.podspec ├── CPCollectionViewWheelLayoutSwift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── CPCollectionViewWheelLayoutSwift.xcscheme ├── CPCollectionViewWheelLayoutSwift ├── CPCollectionViewWheelLayout.swift ├── CPCollectionViewWheelLayoutSwift.h └── Info.plist ├── Example ├── CPCollectionViewWheelLayoutSwift.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── CPCollectionViewWheelLayoutSwift_Example.xcscheme ├── CPCollectionViewWheelLayoutSwift.xcworkspace │ └── contents.xcworkspacedata ├── CPCollectionViewWheelLayoutSwift │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── CPColletionViewCell.swift │ ├── CPTableViewController.swift │ ├── CPViewController.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ └── Info.plist ├── Podfile ├── Podfile.lock └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── ScreenShot.png └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | # Xcode 4 | # 5 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 6 | 7 | ## Build generated 8 | build/ 9 | DerivedData/ 10 | 11 | ## Various settings 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata/ 21 | *.xccheckout 22 | profile 23 | *.moved-aside 24 | DerivedData 25 | *.hmap 26 | *.ipa 27 | 28 | # Bundler 29 | .bundle 30 | 31 | ## Other 32 | *.moved-aside 33 | *.xcuserstate 34 | 35 | ## Obj-C/Swift specific 36 | *.hmap 37 | *.ipa 38 | *.dSYM.zip 39 | *.dSYM 40 | 41 | ## Playgrounds 42 | timeline.xctimeline 43 | playground.xcworkspace 44 | 45 | # Swift Package Manager 46 | # 47 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 48 | # Packages/ 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | Pods/ 58 | 59 | # Carthage 60 | # 61 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 62 | Carthage/Checkouts 63 | 64 | Carthage/Build 65 | 66 | # fastlane 67 | # 68 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 69 | # screenshots whenever they are needed. 70 | # For more information about the recommended setup visit: 71 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 72 | 73 | fastlane/report.xml 74 | fastlane/Preview.html 75 | fastlane/screenshots 76 | fastlane/test_output 77 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | echo "3.0.2" > .swift-version -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode8.2 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | before_install: 10 | - rvm install ruby-2.3.1 && rvm use 2.3.1 11 | - gem install xcpretty 12 | - gem install cocoapods # Since Travis is not always on latest version 13 | - pod install --project-directory=Example 14 | after_install: 15 | - pod lib lint 16 | script: 17 | - set -o pipefail 18 | - xcodebuild -project CPCollectionViewWheelLayoutSwift.xcodeproj -scheme CPCollectionViewWheelLayoutSwift -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty 19 | 20 | notifications: 21 | email: false 22 | after_success: 23 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /CPCollectionViewLayout-BottomCenter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParsifalC/CPCollectionViewWheelLayoutSwift/292ea66e8a23250a2b626c644fc11f04a4c1a587/CPCollectionViewLayout-BottomCenter.gif -------------------------------------------------------------------------------- /CPCollectionViewLayout-LeftBottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParsifalC/CPCollectionViewWheelLayoutSwift/292ea66e8a23250a2b626c644fc11f04a4c1a587/CPCollectionViewLayout-LeftBottom.gif -------------------------------------------------------------------------------- /CPCollectionViewLayout-LeftCenter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParsifalC/CPCollectionViewWheelLayoutSwift/292ea66e8a23250a2b626c644fc11f04a4c1a587/CPCollectionViewLayout-LeftCenter.gif -------------------------------------------------------------------------------- /CPCollectionViewLayout-TopCenter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParsifalC/CPCollectionViewWheelLayoutSwift/292ea66e8a23250a2b626c644fc11f04a4c1a587/CPCollectionViewLayout-TopCenter.gif -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'CPCollectionViewWheelLayoutSwift' 3 | s.version = '0.1.5' 4 | s.summary = 'An awesome layout for UICollcetionView' 5 | s.description = <<-DESC 6 | An awesome layout for UICollcetionView! 7 | DESC 8 | s.homepage = 'https://github.com/parsifalc/CPCollectionViewWheelLayoutSwift' 9 | s.license = { :type => 'MIT', :file => 'LICENSE' } 10 | s.author = { 'Parsifal' => 'zmw@izmw.me' } 11 | s.source = { :git => 'https://github.com/parsifalc/CPCollectionViewWheelLayoutSwift.git', :tag => s.version.to_s } 12 | s.ios.deployment_target = '8.0' 13 | s.source_files = 'CPCollectionViewWheelLayoutSwift/**/*.swift' 14 | s.frameworks = 'UIKit' 15 | end 16 | -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 90DA687E1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = 90DA687C1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 90DA68851E28A5240046F8C9 /* CPCollectionViewWheelLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90DA68841E28A5240046F8C9 /* CPCollectionViewWheelLayout.swift */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 90DA68791E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CPCollectionViewWheelLayoutSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | 90DA687C1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPCollectionViewWheelLayoutSwift.h; sourceTree = ""; }; 17 | 90DA687D1E28A4F00046F8C9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 18 | 90DA68841E28A5240046F8C9 /* CPCollectionViewWheelLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CPCollectionViewWheelLayout.swift; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 90DA68751E28A4F00046F8C9 /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | 90DA686F1E28A4F00046F8C9 = { 33 | isa = PBXGroup; 34 | children = ( 35 | 90DA687B1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift */, 36 | 90DA687A1E28A4F00046F8C9 /* Products */, 37 | ); 38 | sourceTree = ""; 39 | }; 40 | 90DA687A1E28A4F00046F8C9 /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 90DA68791E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.framework */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | 90DA687B1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 90DA687C1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.h */, 52 | 90DA68841E28A5240046F8C9 /* CPCollectionViewWheelLayout.swift */, 53 | 90DA687D1E28A4F00046F8C9 /* Info.plist */, 54 | ); 55 | path = CPCollectionViewWheelLayoutSwift; 56 | sourceTree = ""; 57 | }; 58 | /* End PBXGroup section */ 59 | 60 | /* Begin PBXHeadersBuildPhase section */ 61 | 90DA68761E28A4F00046F8C9 /* Headers */ = { 62 | isa = PBXHeadersBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 90DA687E1E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.h in Headers */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXHeadersBuildPhase section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 90DA68781E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = 90DA68811E28A4F00046F8C9 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift" */; 75 | buildPhases = ( 76 | 90DA68741E28A4F00046F8C9 /* Sources */, 77 | 90DA68751E28A4F00046F8C9 /* Frameworks */, 78 | 90DA68761E28A4F00046F8C9 /* Headers */, 79 | 90DA68771E28A4F00046F8C9 /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = CPCollectionViewWheelLayoutSwift; 86 | productName = CPCollectionViewWheelLayoutSwift; 87 | productReference = 90DA68791E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift.framework */; 88 | productType = "com.apple.product-type.framework"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | 90DA68701E28A4F00046F8C9 /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastUpgradeCheck = 0820; 97 | ORGANIZATIONNAME = Parsifal; 98 | TargetAttributes = { 99 | 90DA68781E28A4F00046F8C9 = { 100 | CreatedOnToolsVersion = 8.2.1; 101 | DevelopmentTeam = 558X9W8374; 102 | LastSwiftMigration = 0820; 103 | ProvisioningStyle = Automatic; 104 | }; 105 | }; 106 | }; 107 | buildConfigurationList = 90DA68731E28A4F00046F8C9 /* Build configuration list for PBXProject "CPCollectionViewWheelLayoutSwift" */; 108 | compatibilityVersion = "Xcode 3.2"; 109 | developmentRegion = English; 110 | hasScannedForEncodings = 0; 111 | knownRegions = ( 112 | en, 113 | ); 114 | mainGroup = 90DA686F1E28A4F00046F8C9; 115 | productRefGroup = 90DA687A1E28A4F00046F8C9 /* Products */; 116 | projectDirPath = ""; 117 | projectRoot = ""; 118 | targets = ( 119 | 90DA68781E28A4F00046F8C9 /* CPCollectionViewWheelLayoutSwift */, 120 | ); 121 | }; 122 | /* End PBXProject section */ 123 | 124 | /* Begin PBXResourcesBuildPhase section */ 125 | 90DA68771E28A4F00046F8C9 /* Resources */ = { 126 | isa = PBXResourcesBuildPhase; 127 | buildActionMask = 2147483647; 128 | files = ( 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXResourcesBuildPhase section */ 133 | 134 | /* Begin PBXSourcesBuildPhase section */ 135 | 90DA68741E28A4F00046F8C9 /* Sources */ = { 136 | isa = PBXSourcesBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 90DA68851E28A5240046F8C9 /* CPCollectionViewWheelLayout.swift in Sources */, 140 | ); 141 | runOnlyForDeploymentPostprocessing = 0; 142 | }; 143 | /* End PBXSourcesBuildPhase section */ 144 | 145 | /* Begin XCBuildConfiguration section */ 146 | 90DA687F1E28A4F00046F8C9 /* Debug */ = { 147 | isa = XCBuildConfiguration; 148 | buildSettings = { 149 | ALWAYS_SEARCH_USER_PATHS = NO; 150 | CLANG_ANALYZER_NONNULL = YES; 151 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 152 | CLANG_CXX_LIBRARY = "libc++"; 153 | CLANG_ENABLE_MODULES = YES; 154 | CLANG_ENABLE_OBJC_ARC = YES; 155 | CLANG_WARN_BOOL_CONVERSION = YES; 156 | CLANG_WARN_CONSTANT_CONVERSION = YES; 157 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 158 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 159 | CLANG_WARN_EMPTY_BODY = YES; 160 | CLANG_WARN_ENUM_CONVERSION = YES; 161 | CLANG_WARN_INFINITE_RECURSION = YES; 162 | CLANG_WARN_INT_CONVERSION = YES; 163 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 164 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 165 | CLANG_WARN_UNREACHABLE_CODE = YES; 166 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 167 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 168 | COPY_PHASE_STRIP = NO; 169 | CURRENT_PROJECT_VERSION = 1; 170 | DEBUG_INFORMATION_FORMAT = dwarf; 171 | ENABLE_STRICT_OBJC_MSGSEND = YES; 172 | ENABLE_TESTABILITY = YES; 173 | GCC_C_LANGUAGE_STANDARD = gnu99; 174 | GCC_DYNAMIC_NO_PIC = NO; 175 | GCC_NO_COMMON_BLOCKS = YES; 176 | GCC_OPTIMIZATION_LEVEL = 0; 177 | GCC_PREPROCESSOR_DEFINITIONS = ( 178 | "DEBUG=1", 179 | "$(inherited)", 180 | ); 181 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 182 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 183 | GCC_WARN_UNDECLARED_SELECTOR = YES; 184 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 185 | GCC_WARN_UNUSED_FUNCTION = YES; 186 | GCC_WARN_UNUSED_VARIABLE = YES; 187 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 188 | MTL_ENABLE_DEBUG_INFO = YES; 189 | ONLY_ACTIVE_ARCH = YES; 190 | SDKROOT = iphoneos; 191 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 192 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 193 | TARGETED_DEVICE_FAMILY = "1,2"; 194 | VERSIONING_SYSTEM = "apple-generic"; 195 | VERSION_INFO_PREFIX = ""; 196 | }; 197 | name = Debug; 198 | }; 199 | 90DA68801E28A4F00046F8C9 /* Release */ = { 200 | isa = XCBuildConfiguration; 201 | buildSettings = { 202 | ALWAYS_SEARCH_USER_PATHS = NO; 203 | CLANG_ANALYZER_NONNULL = YES; 204 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 205 | CLANG_CXX_LIBRARY = "libc++"; 206 | CLANG_ENABLE_MODULES = YES; 207 | CLANG_ENABLE_OBJC_ARC = YES; 208 | CLANG_WARN_BOOL_CONVERSION = YES; 209 | CLANG_WARN_CONSTANT_CONVERSION = YES; 210 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 211 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 212 | CLANG_WARN_EMPTY_BODY = YES; 213 | CLANG_WARN_ENUM_CONVERSION = YES; 214 | CLANG_WARN_INFINITE_RECURSION = YES; 215 | CLANG_WARN_INT_CONVERSION = YES; 216 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 217 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 218 | CLANG_WARN_UNREACHABLE_CODE = YES; 219 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 220 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 221 | COPY_PHASE_STRIP = NO; 222 | CURRENT_PROJECT_VERSION = 1; 223 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 224 | ENABLE_NS_ASSERTIONS = NO; 225 | ENABLE_STRICT_OBJC_MSGSEND = YES; 226 | GCC_C_LANGUAGE_STANDARD = gnu99; 227 | GCC_NO_COMMON_BLOCKS = YES; 228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 230 | GCC_WARN_UNDECLARED_SELECTOR = YES; 231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 232 | GCC_WARN_UNUSED_FUNCTION = YES; 233 | GCC_WARN_UNUSED_VARIABLE = YES; 234 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 235 | MTL_ENABLE_DEBUG_INFO = NO; 236 | SDKROOT = iphoneos; 237 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 238 | TARGETED_DEVICE_FAMILY = "1,2"; 239 | VALIDATE_PRODUCT = YES; 240 | VERSIONING_SYSTEM = "apple-generic"; 241 | VERSION_INFO_PREFIX = ""; 242 | }; 243 | name = Release; 244 | }; 245 | 90DA68821E28A4F00046F8C9 /* Debug */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | CLANG_ENABLE_MODULES = YES; 249 | CODE_SIGN_IDENTITY = ""; 250 | DEFINES_MODULE = YES; 251 | DEVELOPMENT_TEAM = 558X9W8374; 252 | DYLIB_COMPATIBILITY_VERSION = 1; 253 | DYLIB_CURRENT_VERSION = 1; 254 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 255 | INFOPLIST_FILE = CPCollectionViewWheelLayoutSwift/Info.plist; 256 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 257 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 258 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 259 | PRODUCT_BUNDLE_IDENTIFIER = com.Parsifal.CPCollectionViewWheelLayoutSwift; 260 | PRODUCT_NAME = "$(TARGET_NAME)"; 261 | SKIP_INSTALL = YES; 262 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 263 | SWIFT_VERSION = 3.0; 264 | TARGETED_DEVICE_FAMILY = 1; 265 | }; 266 | name = Debug; 267 | }; 268 | 90DA68831E28A4F00046F8C9 /* Release */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | CLANG_ENABLE_MODULES = YES; 272 | CODE_SIGN_IDENTITY = ""; 273 | DEFINES_MODULE = YES; 274 | DEVELOPMENT_TEAM = 558X9W8374; 275 | DYLIB_COMPATIBILITY_VERSION = 1; 276 | DYLIB_CURRENT_VERSION = 1; 277 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 278 | INFOPLIST_FILE = CPCollectionViewWheelLayoutSwift/Info.plist; 279 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 280 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 282 | PRODUCT_BUNDLE_IDENTIFIER = com.Parsifal.CPCollectionViewWheelLayoutSwift; 283 | PRODUCT_NAME = "$(TARGET_NAME)"; 284 | SKIP_INSTALL = YES; 285 | SWIFT_VERSION = 3.0; 286 | TARGETED_DEVICE_FAMILY = 1; 287 | }; 288 | name = Release; 289 | }; 290 | /* End XCBuildConfiguration section */ 291 | 292 | /* Begin XCConfigurationList section */ 293 | 90DA68731E28A4F00046F8C9 /* Build configuration list for PBXProject "CPCollectionViewWheelLayoutSwift" */ = { 294 | isa = XCConfigurationList; 295 | buildConfigurations = ( 296 | 90DA687F1E28A4F00046F8C9 /* Debug */, 297 | 90DA68801E28A4F00046F8C9 /* Release */, 298 | ); 299 | defaultConfigurationIsVisible = 0; 300 | defaultConfigurationName = Release; 301 | }; 302 | 90DA68811E28A4F00046F8C9 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift" */ = { 303 | isa = XCConfigurationList; 304 | buildConfigurations = ( 305 | 90DA68821E28A4F00046F8C9 /* Debug */, 306 | 90DA68831E28A4F00046F8C9 /* Release */, 307 | ); 308 | defaultConfigurationIsVisible = 0; 309 | defaultConfigurationName = Release; 310 | }; 311 | /* End XCConfigurationList section */ 312 | }; 313 | rootObject = 90DA68701E28A4F00046F8C9 /* Project object */; 314 | } 315 | -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift.xcodeproj/xcshareddata/xcschemes/CPCollectionViewWheelLayoutSwift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift/CPCollectionViewWheelLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPCollectionViewWheelLayout.swift 3 | // CPCollectionViewWheelLayout-Swift 4 | // 5 | // Created by Parsifal on 2016/12/30. 6 | // Copyright © 2016年 Parsifal. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum CPWheelLayoutType:Int { 12 | case leftBottom = 0 13 | case rightBottom 14 | case leftTop 15 | case rightTop 16 | case leftCenter 17 | case rightCenter 18 | case topCenter 19 | case bottomCenter 20 | } 21 | 22 | public struct CPWheelLayoutConfiguration { 23 | public var cellSize:CGSize { 24 | didSet { 25 | if cellSize.width<=0.0 || cellSize.height<=0.0 { 26 | cellSize = CGSize.init(width: 50.0, height: 50.0) 27 | } 28 | } 29 | } 30 | public var radius:Double { 31 | didSet { 32 | if radius <= 0 { 33 | radius = 200.0 34 | } 35 | } 36 | } 37 | public var angular:Double { 38 | didSet { 39 | if angular <= 0 { 40 | angular = 20.0 41 | } 42 | } 43 | } 44 | 45 | public var fadeAway:Bool 46 | public var zoomInOut:Bool 47 | public var maxContentHeight:Double 48 | public var contentHeigthPadding:Double 49 | public var wheelType:CPWheelLayoutType 50 | 51 | // MARK: - Initial Methods 52 | public init(withCellSize cellSize:CGSize, 53 | radius:Double, 54 | angular:Double, 55 | wheelType:CPWheelLayoutType, 56 | zoomInOut:Bool = true, 57 | fadeAway:Bool = true, 58 | maxContentHeight:Double = 0.0, 59 | contentHeigthPadding:Double = 0.0) { 60 | self.cellSize = cellSize 61 | self.radius = radius 62 | self.angular = angular 63 | self.wheelType = wheelType 64 | self.zoomInOut = zoomInOut 65 | self.fadeAway = fadeAway 66 | self.maxContentHeight = maxContentHeight 67 | self.contentHeigthPadding = contentHeigthPadding 68 | } 69 | } 70 | 71 | open class CPCollectionViewWheelLayout: UICollectionViewLayout { 72 | 73 | // MARK: - Properties 74 | var cellCount = 0 75 | var invisibleCellCount = 0.0 76 | var cachedAttributesArray = [UICollectionViewLayoutAttributes]() 77 | open var configuration:CPWheelLayoutConfiguration 78 | 79 | // MARK: - Open Methods 80 | public init(withConfiguration configuration:CPWheelLayoutConfiguration) { 81 | self.configuration = configuration 82 | super.init() 83 | } 84 | 85 | required public init?(coder aDecoder: NSCoder) { 86 | self.configuration = CPWheelLayoutConfiguration.init(withCellSize: CGSize(width: 50, height: 50), radius: 100, angular: 30, wheelType: .leftBottom) 87 | super.init(coder: aDecoder) 88 | } 89 | 90 | override open func prepare() { 91 | super.prepare() 92 | guard let collectionView = collectionView else { return } 93 | cellCount = collectionView.numberOfItems(inSection: 0) 94 | guard cellCount > 0 else { 95 | return 96 | } 97 | invisibleCellCount = Double(collectionView.contentOffset.y/configuration.cellSize.height) 98 | cachedAttributesArray.removeAll() 99 | for i in 0.. Bool { 107 | return true 108 | } 109 | 110 | override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { 111 | guard let collectionView = collectionView else { return nil } 112 | 113 | let attributes = cachedAttributesArray[indexPath.item] 114 | let viewSize = collectionView.bounds.size 115 | let cellSize = configuration.cellSize 116 | let angular = configuration.angular 117 | let radius = configuration.radius 118 | let fadeAway = configuration.fadeAway 119 | let contentOffset = collectionView.contentOffset 120 | let visibleCellIndex = Double(indexPath.item)-invisibleCellCount 121 | attributes.size = cellSize 122 | attributes.isHidden = true 123 | var angle = angular/90.0*Double(visibleCellIndex)*M_PI_2 124 | let angleOffset = asin(Double(cellSize.width)/radius) 125 | var translation = CGAffineTransform.identity 126 | 127 | switch configuration.wheelType { 128 | case .leftBottom: 129 | attributes.center = CGPoint.init(x: cellSize.width/2.0, 130 | y: (contentOffset.y)+(viewSize.height)-cellSize.height/2) 131 | 132 | if (angle <= (M_PI_2+2.0*angleOffset+angular/90.0)) && (angle >= -angleOffset) { 133 | attributes.isHidden = false 134 | translation = CGAffineTransform.init(translationX: CGFloat(sin(angle)*radius), 135 | y: -(CGFloat(cos(angle)*radius)+cellSize.height/2.0)) 136 | } 137 | case .rightBottom: 138 | attributes.center = CGPoint.init(x: (viewSize.width)-cellSize.width/2.0, 139 | y: (contentOffset.y)+(viewSize.height)-cellSize.height/2) 140 | 141 | if (angle <= (M_PI_2+2.0*angleOffset+angular/90.0)) && (angle >= -angleOffset) { 142 | attributes.isHidden = false 143 | translation = CGAffineTransform.init(translationX: CGFloat(-sin(angle)*radius), 144 | y: -(CGFloat(cos(angle)*radius)+cellSize.height/2.0)) 145 | } 146 | case .leftTop: 147 | attributes.center = CGPoint.init(x: cellSize.width/2.0, 148 | y: (contentOffset.y)) 149 | 150 | if (angle <= (M_PI_2+2.0*angleOffset+angular/90.0)) && (angle >= -angleOffset) { 151 | attributes.isHidden = false 152 | translation = CGAffineTransform.init(translationX: CGFloat(cos(angle)*radius), 153 | y: (CGFloat(sin(angle)*radius)+cellSize.height/2.0)) 154 | } 155 | case .rightTop: 156 | attributes.center = CGPoint.init(x: (viewSize.width)-cellSize.width/2.0, 157 | y: (contentOffset.y)) 158 | 159 | if (angle <= (M_PI_2+2.0*angleOffset+angular/90.0)) && (angle >= -angleOffset) { 160 | attributes.isHidden = false 161 | translation = CGAffineTransform.init(translationX: CGFloat(-cos(angle)*radius), 162 | y: (CGFloat(sin(angle)*radius)+cellSize.height/2.0)) 163 | } 164 | case .leftCenter: 165 | attributes.center = CGPoint.init(x: cellSize.width/2.0, 166 | y: (contentOffset.y)+(viewSize.height)/2) 167 | angle = visibleCellIndex*angular/180*M_PI; 168 | 169 | if (angle <= (M_PI+2.0*angleOffset+angular/180.0)) && (angle >= -angleOffset) { 170 | attributes.isHidden = false 171 | translation = CGAffineTransform.init(translationX: CGFloat(sin(angle)*radius), 172 | y: -CGFloat(cos(angle)*radius)) 173 | } 174 | 175 | case .rightCenter: 176 | attributes.center = CGPoint.init(x: (viewSize.width)-cellSize.width/2.0, 177 | y: (contentOffset.y)+(viewSize.height)/2) 178 | 179 | if (angle <= (M_PI+2.0*angleOffset+angular/180.0)) && (angle >= -angleOffset) { 180 | attributes.isHidden = false 181 | translation = CGAffineTransform.init(translationX: -CGFloat(sin(angle)*radius), 182 | y: -CGFloat(cos(angle)*radius)) 183 | } 184 | case .topCenter: 185 | attributes.center = CGPoint.init(x: (viewSize.width)/2.0, 186 | y: (contentOffset.y)+cellSize.width/2) 187 | angle = visibleCellIndex*angular/180*M_PI; 188 | 189 | if (angle <= (M_PI+2.0*angleOffset+angular/180.0)) && (angle >= -angleOffset) { 190 | attributes.isHidden = false 191 | translation = CGAffineTransform.init(translationX: -CGFloat(cos(angle)*radius), 192 | y: (CGFloat(sin(angle)*radius))) 193 | } 194 | case .bottomCenter: 195 | attributes.center = CGPoint.init(x: (viewSize.width)/2.0, 196 | y: (contentOffset.y)+(viewSize.height)-cellSize.height/2) 197 | angle = visibleCellIndex*angular/180*M_PI; 198 | 199 | if (angle <= (M_PI+2.0*angleOffset+angular/180.0)) && (angle >= -angleOffset) { 200 | attributes.isHidden = false 201 | translation = CGAffineTransform.init(translationX: -CGFloat(cos(angle)*radius), 202 | y: -CGFloat(sin(angle)*radius)) 203 | } 204 | } 205 | 206 | attributes.transform = translation 207 | var fadeFactor:Double 208 | switch configuration.wheelType { 209 | case .bottomCenter,.topCenter,.rightCenter,.leftCenter: 210 | fadeFactor = 1-fabs(angle-M_PI_2)*0.5 211 | default: 212 | fadeFactor = 1-fabs(angle-M_PI_4) 213 | } 214 | attributes.alpha = CGFloat(fadeAway ? (fadeFactor) : 1.0) 215 | attributes.size = CGSize(width:cellSize.width*CGFloat(fadeFactor), height:cellSize.height*CGFloat(fadeFactor)) 216 | return attributes 217 | } 218 | 219 | override open func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { 220 | var mutableAttributes = [UICollectionViewLayoutAttributes]() 221 | for index in 0.. 10 | 11 | //! Project version number for CPCollectionViewWheelLayoutSwift. 12 | FOUNDATION_EXPORT double CPCollectionViewWheelLayoutSwiftVersionNumber; 13 | 14 | //! Project version string for CPCollectionViewWheelLayoutSwift. 15 | FOUNDATION_EXPORT const unsigned char CPCollectionViewWheelLayoutSwiftVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /CPCollectionViewWheelLayoutSwift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 12 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 13 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 14 | 8E2B47DED3DEDFB8AE688D3D /* Pods_CPCollectionViewWheelLayoutSwift_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBF890C6BA149E263E1127D0 /* Pods_CPCollectionViewWheelLayoutSwift_Tests.framework */; }; 15 | 90F65AA41E23B354000940B9 /* CPColletionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90F65AA11E23B354000940B9 /* CPColletionViewCell.swift */; }; 16 | 90F65AA51E23B354000940B9 /* CPTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90F65AA21E23B354000940B9 /* CPTableViewController.swift */; }; 17 | 90F65AA61E23B354000940B9 /* CPViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90F65AA31E23B354000940B9 /* CPViewController.swift */; }; 18 | 90F65AA91E23B8B9000940B9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 90F65AA71E23B8B9000940B9 /* LaunchScreen.storyboard */; }; 19 | F8B523F574712BC8B57CCEAA /* Pods_CPCollectionViewWheelLayoutSwift_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A321EFFE3059801F33D6634C /* Pods_CPCollectionViewWheelLayoutSwift_Example.framework */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 28 | remoteInfo = CPCollectionViewWheelLayoutSwift; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 4AAA8A30EB8070DF47B80FB2 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CPCollectionViewWheelLayoutSwift_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Tests/Pods-CPCollectionViewWheelLayoutSwift_Tests.release.xcconfig"; sourceTree = ""; }; 34 | 607FACD01AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CPCollectionViewWheelLayoutSwift_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 39 | 607FACE51AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CPCollectionViewWheelLayoutSwift_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 42 | 8E112F12B5C767F23AD7099D /* Pods-CPCollectionViewWheelLayoutSwift_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CPCollectionViewWheelLayoutSwift_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Example/Pods-CPCollectionViewWheelLayoutSwift_Example.debug.xcconfig"; sourceTree = ""; }; 43 | 90F65AA11E23B354000940B9 /* CPColletionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CPColletionViewCell.swift; sourceTree = ""; }; 44 | 90F65AA21E23B354000940B9 /* CPTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CPTableViewController.swift; sourceTree = ""; }; 45 | 90F65AA31E23B354000940B9 /* CPViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CPViewController.swift; sourceTree = ""; }; 46 | 90F65AA81E23B8B9000940B9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 919FB0C3E417776A3BC60111 /* Pods-CPCollectionViewWheelLayoutSwift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CPCollectionViewWheelLayoutSwift_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Example/Pods-CPCollectionViewWheelLayoutSwift_Example.release.xcconfig"; sourceTree = ""; }; 48 | 9B61135BA025B5A435FA1C09 /* CPCollectionViewWheelLayoutSwift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CPCollectionViewWheelLayoutSwift.podspec; path = ../CPCollectionViewWheelLayoutSwift.podspec; sourceTree = ""; }; 49 | A321EFFE3059801F33D6634C /* Pods_CPCollectionViewWheelLayoutSwift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CPCollectionViewWheelLayoutSwift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | B7D75E71EE584418F86177D3 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 51 | BBF890C6BA149E263E1127D0 /* Pods_CPCollectionViewWheelLayoutSwift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CPCollectionViewWheelLayoutSwift_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | BD9018BC3F0CEFF985E79F56 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 53 | CEB453FCDF05B5BC1257AC48 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CPCollectionViewWheelLayoutSwift_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Tests/Pods-CPCollectionViewWheelLayoutSwift_Tests.debug.xcconfig"; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | F8B523F574712BC8B57CCEAA /* Pods_CPCollectionViewWheelLayoutSwift_Example.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | 8E2B47DED3DEDFB8AE688D3D /* Pods_CPCollectionViewWheelLayoutSwift_Tests.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 607FACC71AFB9204008FA782 = { 77 | isa = PBXGroup; 78 | children = ( 79 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 80 | 607FACD21AFB9204008FA782 /* Example for CPCollectionViewWheelLayoutSwift */, 81 | 607FACE81AFB9204008FA782 /* Tests */, 82 | 607FACD11AFB9204008FA782 /* Products */, 83 | AF73248B42E535542EAC6404 /* Pods */, 84 | C2E730FDC3F00AAF9E3F382C /* Frameworks */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | 607FACD11AFB9204008FA782 /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 607FACD01AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example.app */, 92 | 607FACE51AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Tests.xctest */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | 607FACD21AFB9204008FA782 /* Example for CPCollectionViewWheelLayoutSwift */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 101 | 90F65AA11E23B354000940B9 /* CPColletionViewCell.swift */, 102 | 90F65AA21E23B354000940B9 /* CPTableViewController.swift */, 103 | 90F65AA31E23B354000940B9 /* CPViewController.swift */, 104 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 105 | 90F65AA71E23B8B9000940B9 /* LaunchScreen.storyboard */, 106 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 107 | 607FACD31AFB9204008FA782 /* Supporting Files */, 108 | ); 109 | name = "Example for CPCollectionViewWheelLayoutSwift"; 110 | path = CPCollectionViewWheelLayoutSwift; 111 | sourceTree = ""; 112 | }; 113 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 607FACD41AFB9204008FA782 /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | 607FACE81AFB9204008FA782 /* Tests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 125 | 607FACE91AFB9204008FA782 /* Supporting Files */, 126 | ); 127 | path = Tests; 128 | sourceTree = ""; 129 | }; 130 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 607FACEA1AFB9204008FA782 /* Info.plist */, 134 | ); 135 | name = "Supporting Files"; 136 | sourceTree = ""; 137 | }; 138 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 9B61135BA025B5A435FA1C09 /* CPCollectionViewWheelLayoutSwift.podspec */, 142 | BD9018BC3F0CEFF985E79F56 /* README.md */, 143 | B7D75E71EE584418F86177D3 /* LICENSE */, 144 | ); 145 | name = "Podspec Metadata"; 146 | sourceTree = ""; 147 | }; 148 | AF73248B42E535542EAC6404 /* Pods */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 8E112F12B5C767F23AD7099D /* Pods-CPCollectionViewWheelLayoutSwift_Example.debug.xcconfig */, 152 | 919FB0C3E417776A3BC60111 /* Pods-CPCollectionViewWheelLayoutSwift_Example.release.xcconfig */, 153 | CEB453FCDF05B5BC1257AC48 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.debug.xcconfig */, 154 | 4AAA8A30EB8070DF47B80FB2 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.release.xcconfig */, 155 | ); 156 | name = Pods; 157 | sourceTree = ""; 158 | }; 159 | C2E730FDC3F00AAF9E3F382C /* Frameworks */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | A321EFFE3059801F33D6634C /* Pods_CPCollectionViewWheelLayoutSwift_Example.framework */, 163 | BBF890C6BA149E263E1127D0 /* Pods_CPCollectionViewWheelLayoutSwift_Tests.framework */, 164 | ); 165 | name = Frameworks; 166 | sourceTree = ""; 167 | }; 168 | /* End PBXGroup section */ 169 | 170 | /* Begin PBXNativeTarget section */ 171 | 607FACCF1AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example */ = { 172 | isa = PBXNativeTarget; 173 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift_Example" */; 174 | buildPhases = ( 175 | 92450BD19C9FF9BCEB9C6B2B /* [CP] Check Pods Manifest.lock */, 176 | 607FACCC1AFB9204008FA782 /* Sources */, 177 | 607FACCD1AFB9204008FA782 /* Frameworks */, 178 | 607FACCE1AFB9204008FA782 /* Resources */, 179 | 1A5977096CF4EAEB37E4C084 /* [CP] Embed Pods Frameworks */, 180 | B671207B2C1DAF6CC2FDC65A /* [CP] Copy Pods Resources */, 181 | ); 182 | buildRules = ( 183 | ); 184 | dependencies = ( 185 | ); 186 | name = CPCollectionViewWheelLayoutSwift_Example; 187 | productName = CPCollectionViewWheelLayoutSwift; 188 | productReference = 607FACD01AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example.app */; 189 | productType = "com.apple.product-type.application"; 190 | }; 191 | 607FACE41AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Tests */ = { 192 | isa = PBXNativeTarget; 193 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift_Tests" */; 194 | buildPhases = ( 195 | 62F1F9160588101F48A21775 /* [CP] Check Pods Manifest.lock */, 196 | 607FACE11AFB9204008FA782 /* Sources */, 197 | 607FACE21AFB9204008FA782 /* Frameworks */, 198 | 607FACE31AFB9204008FA782 /* Resources */, 199 | 079F05C340D9160154DA6DD0 /* [CP] Embed Pods Frameworks */, 200 | 2D7734AD93D3FAD38B7810DD /* [CP] Copy Pods Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 206 | ); 207 | name = CPCollectionViewWheelLayoutSwift_Tests; 208 | productName = Tests; 209 | productReference = 607FACE51AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Tests.xctest */; 210 | productType = "com.apple.product-type.bundle.unit-test"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | 607FACC81AFB9204008FA782 /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | LastSwiftUpdateCheck = 0720; 219 | LastUpgradeCheck = 0820; 220 | ORGANIZATIONNAME = CocoaPods; 221 | TargetAttributes = { 222 | 607FACCF1AFB9204008FA782 = { 223 | CreatedOnToolsVersion = 6.3.1; 224 | DevelopmentTeam = 558X9W8374; 225 | LastSwiftMigration = 0820; 226 | }; 227 | 607FACE41AFB9204008FA782 = { 228 | CreatedOnToolsVersion = 6.3.1; 229 | DevelopmentTeam = 558X9W8374; 230 | LastSwiftMigration = 0820; 231 | TestTargetID = 607FACCF1AFB9204008FA782; 232 | }; 233 | }; 234 | }; 235 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "CPCollectionViewWheelLayoutSwift" */; 236 | compatibilityVersion = "Xcode 3.2"; 237 | developmentRegion = English; 238 | hasScannedForEncodings = 0; 239 | knownRegions = ( 240 | en, 241 | Base, 242 | ); 243 | mainGroup = 607FACC71AFB9204008FA782; 244 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 245 | projectDirPath = ""; 246 | projectRoot = ""; 247 | targets = ( 248 | 607FACCF1AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example */, 249 | 607FACE41AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Tests */, 250 | ); 251 | }; 252 | /* End PBXProject section */ 253 | 254 | /* Begin PBXResourcesBuildPhase section */ 255 | 607FACCE1AFB9204008FA782 /* Resources */ = { 256 | isa = PBXResourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 90F65AA91E23B8B9000940B9 /* LaunchScreen.storyboard in Resources */, 260 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 261 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | }; 265 | 607FACE31AFB9204008FA782 /* Resources */ = { 266 | isa = PBXResourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | /* End PBXResourcesBuildPhase section */ 273 | 274 | /* Begin PBXShellScriptBuildPhase section */ 275 | 079F05C340D9160154DA6DD0 /* [CP] Embed Pods Frameworks */ = { 276 | isa = PBXShellScriptBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | ); 280 | inputPaths = ( 281 | ); 282 | name = "[CP] Embed Pods Frameworks"; 283 | outputPaths = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | shellPath = /bin/sh; 287 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Tests/Pods-CPCollectionViewWheelLayoutSwift_Tests-frameworks.sh\"\n"; 288 | showEnvVarsInLog = 0; 289 | }; 290 | 1A5977096CF4EAEB37E4C084 /* [CP] Embed Pods Frameworks */ = { 291 | isa = PBXShellScriptBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | ); 295 | inputPaths = ( 296 | ); 297 | name = "[CP] Embed Pods Frameworks"; 298 | outputPaths = ( 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | shellPath = /bin/sh; 302 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Example/Pods-CPCollectionViewWheelLayoutSwift_Example-frameworks.sh\"\n"; 303 | showEnvVarsInLog = 0; 304 | }; 305 | 2D7734AD93D3FAD38B7810DD /* [CP] Copy Pods Resources */ = { 306 | isa = PBXShellScriptBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | inputPaths = ( 311 | ); 312 | name = "[CP] Copy Pods Resources"; 313 | outputPaths = ( 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | shellPath = /bin/sh; 317 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Tests/Pods-CPCollectionViewWheelLayoutSwift_Tests-resources.sh\"\n"; 318 | showEnvVarsInLog = 0; 319 | }; 320 | 62F1F9160588101F48A21775 /* [CP] Check Pods Manifest.lock */ = { 321 | isa = PBXShellScriptBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | ); 325 | inputPaths = ( 326 | ); 327 | name = "[CP] Check Pods Manifest.lock"; 328 | outputPaths = ( 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | shellPath = /bin/sh; 332 | 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"; 333 | showEnvVarsInLog = 0; 334 | }; 335 | 92450BD19C9FF9BCEB9C6B2B /* [CP] Check Pods Manifest.lock */ = { 336 | isa = PBXShellScriptBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | inputPaths = ( 341 | ); 342 | name = "[CP] Check Pods Manifest.lock"; 343 | outputPaths = ( 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | shellPath = /bin/sh; 347 | 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"; 348 | showEnvVarsInLog = 0; 349 | }; 350 | B671207B2C1DAF6CC2FDC65A /* [CP] Copy Pods Resources */ = { 351 | isa = PBXShellScriptBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | ); 355 | inputPaths = ( 356 | ); 357 | name = "[CP] Copy Pods Resources"; 358 | outputPaths = ( 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | shellPath = /bin/sh; 362 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CPCollectionViewWheelLayoutSwift_Example/Pods-CPCollectionViewWheelLayoutSwift_Example-resources.sh\"\n"; 363 | showEnvVarsInLog = 0; 364 | }; 365 | /* End PBXShellScriptBuildPhase section */ 366 | 367 | /* Begin PBXSourcesBuildPhase section */ 368 | 607FACCC1AFB9204008FA782 /* Sources */ = { 369 | isa = PBXSourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | 90F65AA51E23B354000940B9 /* CPTableViewController.swift in Sources */, 373 | 90F65AA41E23B354000940B9 /* CPColletionViewCell.swift in Sources */, 374 | 90F65AA61E23B354000940B9 /* CPViewController.swift in Sources */, 375 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | 607FACE11AFB9204008FA782 /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | /* End PBXSourcesBuildPhase section */ 388 | 389 | /* Begin PBXTargetDependency section */ 390 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 391 | isa = PBXTargetDependency; 392 | target = 607FACCF1AFB9204008FA782 /* CPCollectionViewWheelLayoutSwift_Example */; 393 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 394 | }; 395 | /* End PBXTargetDependency section */ 396 | 397 | /* Begin PBXVariantGroup section */ 398 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 399 | isa = PBXVariantGroup; 400 | children = ( 401 | 607FACDA1AFB9204008FA782 /* Base */, 402 | ); 403 | name = Main.storyboard; 404 | sourceTree = ""; 405 | }; 406 | 90F65AA71E23B8B9000940B9 /* LaunchScreen.storyboard */ = { 407 | isa = PBXVariantGroup; 408 | children = ( 409 | 90F65AA81E23B8B9000940B9 /* Base */, 410 | ); 411 | name = LaunchScreen.storyboard; 412 | sourceTree = ""; 413 | }; 414 | /* End PBXVariantGroup section */ 415 | 416 | /* Begin XCBuildConfiguration section */ 417 | 607FACED1AFB9204008FA782 /* Debug */ = { 418 | isa = XCBuildConfiguration; 419 | buildSettings = { 420 | ALWAYS_SEARCH_USER_PATHS = NO; 421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_WARN_BOOL_CONVERSION = YES; 426 | CLANG_WARN_CONSTANT_CONVERSION = YES; 427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INFINITE_RECURSION = YES; 431 | CLANG_WARN_INT_CONVERSION = YES; 432 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 433 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 434 | CLANG_WARN_UNREACHABLE_CODE = YES; 435 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 436 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 437 | COPY_PHASE_STRIP = NO; 438 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 439 | ENABLE_STRICT_OBJC_MSGSEND = YES; 440 | ENABLE_TESTABILITY = YES; 441 | GCC_C_LANGUAGE_STANDARD = gnu99; 442 | GCC_DYNAMIC_NO_PIC = NO; 443 | GCC_NO_COMMON_BLOCKS = YES; 444 | GCC_OPTIMIZATION_LEVEL = 0; 445 | GCC_PREPROCESSOR_DEFINITIONS = ( 446 | "DEBUG=1", 447 | "$(inherited)", 448 | ); 449 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 452 | GCC_WARN_UNDECLARED_SELECTOR = YES; 453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 454 | GCC_WARN_UNUSED_FUNCTION = YES; 455 | GCC_WARN_UNUSED_VARIABLE = YES; 456 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 457 | MTL_ENABLE_DEBUG_INFO = YES; 458 | ONLY_ACTIVE_ARCH = YES; 459 | SDKROOT = iphoneos; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | }; 462 | name = Debug; 463 | }; 464 | 607FACEE1AFB9204008FA782 /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | ALWAYS_SEARCH_USER_PATHS = NO; 468 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 469 | CLANG_CXX_LIBRARY = "libc++"; 470 | CLANG_ENABLE_MODULES = YES; 471 | CLANG_ENABLE_OBJC_ARC = YES; 472 | CLANG_WARN_BOOL_CONVERSION = YES; 473 | CLANG_WARN_CONSTANT_CONVERSION = YES; 474 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 475 | CLANG_WARN_EMPTY_BODY = YES; 476 | CLANG_WARN_ENUM_CONVERSION = YES; 477 | CLANG_WARN_INFINITE_RECURSION = YES; 478 | CLANG_WARN_INT_CONVERSION = YES; 479 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNREACHABLE_CODE = YES; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 486 | ENABLE_NS_ASSERTIONS = NO; 487 | ENABLE_STRICT_OBJC_MSGSEND = YES; 488 | GCC_C_LANGUAGE_STANDARD = gnu99; 489 | GCC_NO_COMMON_BLOCKS = YES; 490 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 491 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 492 | GCC_WARN_UNDECLARED_SELECTOR = YES; 493 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 494 | GCC_WARN_UNUSED_FUNCTION = YES; 495 | GCC_WARN_UNUSED_VARIABLE = YES; 496 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 497 | MTL_ENABLE_DEBUG_INFO = NO; 498 | SDKROOT = iphoneos; 499 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 500 | VALIDATE_PRODUCT = YES; 501 | }; 502 | name = Release; 503 | }; 504 | 607FACF01AFB9204008FA782 /* Debug */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = 8E112F12B5C767F23AD7099D /* Pods-CPCollectionViewWheelLayoutSwift_Example.debug.xcconfig */; 507 | buildSettings = { 508 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 509 | DEVELOPMENT_TEAM = 558X9W8374; 510 | INFOPLIST_FILE = CPCollectionViewWheelLayoutSwift/Info.plist; 511 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 513 | MODULE_NAME = ExampleApp; 514 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | SWIFT_VERSION = 3.0; 517 | }; 518 | name = Debug; 519 | }; 520 | 607FACF11AFB9204008FA782 /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 919FB0C3E417776A3BC60111 /* Pods-CPCollectionViewWheelLayoutSwift_Example.release.xcconfig */; 523 | buildSettings = { 524 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 525 | DEVELOPMENT_TEAM = 558X9W8374; 526 | INFOPLIST_FILE = CPCollectionViewWheelLayoutSwift/Info.plist; 527 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 528 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 529 | MODULE_NAME = ExampleApp; 530 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | SWIFT_VERSION = 3.0; 533 | }; 534 | name = Release; 535 | }; 536 | 607FACF31AFB9204008FA782 /* Debug */ = { 537 | isa = XCBuildConfiguration; 538 | baseConfigurationReference = CEB453FCDF05B5BC1257AC48 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.debug.xcconfig */; 539 | buildSettings = { 540 | DEVELOPMENT_TEAM = 558X9W8374; 541 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 542 | GCC_PREPROCESSOR_DEFINITIONS = ( 543 | "DEBUG=1", 544 | "$(inherited)", 545 | ); 546 | INFOPLIST_FILE = Tests/Info.plist; 547 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 548 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 549 | PRODUCT_NAME = "$(TARGET_NAME)"; 550 | SWIFT_VERSION = 3.0; 551 | }; 552 | name = Debug; 553 | }; 554 | 607FACF41AFB9204008FA782 /* Release */ = { 555 | isa = XCBuildConfiguration; 556 | baseConfigurationReference = 4AAA8A30EB8070DF47B80FB2 /* Pods-CPCollectionViewWheelLayoutSwift_Tests.release.xcconfig */; 557 | buildSettings = { 558 | DEVELOPMENT_TEAM = 558X9W8374; 559 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 560 | INFOPLIST_FILE = Tests/Info.plist; 561 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 562 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 563 | PRODUCT_NAME = "$(TARGET_NAME)"; 564 | SWIFT_VERSION = 3.0; 565 | }; 566 | name = Release; 567 | }; 568 | /* End XCBuildConfiguration section */ 569 | 570 | /* Begin XCConfigurationList section */ 571 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "CPCollectionViewWheelLayoutSwift" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 607FACED1AFB9204008FA782 /* Debug */, 575 | 607FACEE1AFB9204008FA782 /* Release */, 576 | ); 577 | defaultConfigurationIsVisible = 0; 578 | defaultConfigurationName = Release; 579 | }; 580 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift_Example" */ = { 581 | isa = XCConfigurationList; 582 | buildConfigurations = ( 583 | 607FACF01AFB9204008FA782 /* Debug */, 584 | 607FACF11AFB9204008FA782 /* Release */, 585 | ); 586 | defaultConfigurationIsVisible = 0; 587 | defaultConfigurationName = Release; 588 | }; 589 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "CPCollectionViewWheelLayoutSwift_Tests" */ = { 590 | isa = XCConfigurationList; 591 | buildConfigurations = ( 592 | 607FACF31AFB9204008FA782 /* Debug */, 593 | 607FACF41AFB9204008FA782 /* Release */, 594 | ); 595 | defaultConfigurationIsVisible = 0; 596 | defaultConfigurationName = Release; 597 | }; 598 | /* End XCConfigurationList section */ 599 | }; 600 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 601 | } 602 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift.xcodeproj/xcshareddata/xcschemes/CPCollectionViewWheelLayoutSwift_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CPCollectionViewWheelLayoutSwift 4 | // 5 | // Created by Parsifal on 01/09/2017. 6 | // Copyright (c) 2017 Parsifal. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 85 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/CPColletionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPColletionViewCell.swift 3 | // CPCollectionViewWheelLayout-Swift 4 | // 5 | // Created by Parsifal on 2016/12/29. 6 | // Copyright © 2016年 Parsifal. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CPCollectionViewCell: UICollectionViewCell { 12 | 13 | // MARK:- Public Properties 14 | public var textLabel:UILabel!; 15 | 16 | override init(frame: CGRect) { 17 | super.init(frame: frame) 18 | setupViews(frame: frame) 19 | } 20 | 21 | required init?(coder aDecoder: NSCoder) { 22 | fatalError("init(coder:) has not been implemented") 23 | } 24 | 25 | // MARK:- Private Methods 26 | fileprivate func setupViews(frame:CGRect) { 27 | contentView.backgroundColor = .yellow 28 | contentView.layer.masksToBounds = true 29 | let labelFrame = CGRect(x:0, y:0, width:frame.width, height:frame.height) 30 | textLabel = UILabel.init(frame: labelFrame) 31 | textLabel.font = .systemFont(ofSize: 20) 32 | textLabel.textColor = .black 33 | textLabel.textAlignment = .center 34 | contentView.addSubview(textLabel) 35 | } 36 | 37 | override func layoutSubviews() { 38 | super.layoutSubviews() 39 | contentView.layer.cornerRadius = frame.width/2 40 | textLabel.frame = CGRect(x:0, y:0, width:frame.width, height:frame.height) 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/CPTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPTableViewController.swift 3 | // CPCollectionViewWheelLayout-Swift 4 | // 5 | // Created by Parsifal on 2017/1/7. 6 | // Copyright © 2017年 Parsifal. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CPCollectionViewWheelLayoutSwift 11 | 12 | class CPTableViewController:UITableViewController { 13 | let wheelTypes = ["leftBottom", "rightBottom", 14 | "leftTop", "rightTop", 15 | "leftCenter", "rightCenter", 16 | "topCenter", "bottomCenter"] 17 | var selectType = CPWheelLayoutType.leftBottom 18 | 19 | override func viewDidLoad() { 20 | super.viewDidLoad() 21 | } 22 | 23 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 24 | let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", 25 | for: indexPath) 26 | cell.textLabel?.text = wheelTypes[indexPath.row] 27 | return cell 28 | } 29 | 30 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 31 | return wheelTypes.count 32 | } 33 | 34 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 35 | let indexPath = tableView.indexPath(for: sender as! UITableViewCell) 36 | let vc = segue.destination as! CPViewController 37 | vc.wheelType = CPWheelLayoutType(rawValue: (indexPath?.row)!)! 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/CPViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CPViewController.swift 3 | // CPCollectionViewWheelLayout-Swift 4 | // 5 | // Created by Parsifal on 2016/12/29. 6 | // Copyright © 2016年 Parsifal. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CPCollectionViewWheelLayoutSwift 11 | 12 | class CPViewController: UIViewController, UICollectionViewDataSource { 13 | 14 | fileprivate let reuseIdentifier = "CPCollectionViewCell" 15 | var colletionView:UICollectionView! 16 | var itemsArray = [String]() 17 | 18 | open var wheelType = CPWheelLayoutType.leftBottom 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | // load data 24 | for item in 0...20 { 25 | itemsArray.append(String(item)) 26 | } 27 | 28 | // setup views 29 | let configuration = CPWheelLayoutConfiguration.init(withCellSize: CGSize.init(width: 100, height: 100), radius: 200, angular: 20, wheelType:wheelType) 30 | let wheelLayout = CPCollectionViewWheelLayout.init(withConfiguration: configuration) 31 | colletionView = UICollectionView.init(frame: view.frame, collectionViewLayout:wheelLayout) 32 | colletionView.showsVerticalScrollIndicator = false 33 | colletionView.showsHorizontalScrollIndicator = false 34 | colletionView.backgroundColor = .white 35 | colletionView.register(CPCollectionViewCell.self, forCellWithReuseIdentifier: reuseIdentifier) 36 | colletionView.dataSource = self 37 | view.addSubview(colletionView) 38 | view.sendSubview(toBack: colletionView) 39 | } 40 | 41 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 42 | return itemsArray.count 43 | } 44 | 45 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 46 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! CPCollectionViewCell 47 | cell.textLabel.text = itemsArray[indexPath.row] 48 | return cell 49 | } 50 | 51 | @IBAction func cellSizeChanged(_ sender: UISlider) { 52 | var configuration = (colletionView.collectionViewLayout as! CPCollectionViewWheelLayout).configuration 53 | configuration.cellSize = CGSize.init(width: Double(sender.value), height: Double(sender.value)) 54 | updateCollectionView(withLayoutConfiguration: configuration) 55 | } 56 | 57 | @IBAction func angularViewChanged(_ sender: UISlider) { 58 | var configuration = (colletionView.collectionViewLayout as! CPCollectionViewWheelLayout).configuration 59 | configuration.angular = Double(sender.value) 60 | updateCollectionView(withLayoutConfiguration: configuration) 61 | } 62 | 63 | @IBAction func radiusValueChanged(_ sender: UISlider) { 64 | var configuration = (colletionView.collectionViewLayout as! CPCollectionViewWheelLayout).configuration 65 | configuration.radius = Double(sender.value) 66 | updateCollectionView(withLayoutConfiguration: configuration) 67 | } 68 | 69 | func updateCollectionView(withLayoutConfiguration configuration:CPWheelLayoutConfiguration) { 70 | let newLayout = CPCollectionViewWheelLayout.init(withConfiguration: configuration) 71 | colletionView.collectionViewLayout.invalidateLayout() 72 | colletionView.collectionViewLayout = newLayout 73 | colletionView.reloadData() 74 | } 75 | 76 | @IBAction func dismissButtonTapped(_ sender: UIButton) { 77 | self.dismiss(animated: true) { 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/CPCollectionViewWheelLayoutSwift/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 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | platform:ios, 8.0 2 | 3 | use_frameworks! 4 | inhibit_all_warnings! 5 | target 'CPCollectionViewWheelLayoutSwift_Example' do 6 | pod 'CPCollectionViewWheelLayoutSwift', :path => '../' 7 | target 'CPCollectionViewWheelLayoutSwift_Tests' do 8 | inherit! :search_paths 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CPCollectionViewWheelLayoutSwift (0.1.5) 3 | 4 | DEPENDENCIES: 5 | - CPCollectionViewWheelLayoutSwift (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | CPCollectionViewWheelLayoutSwift: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | CPCollectionViewWheelLayoutSwift: 861c2bbd80ae064e11f79003c068f663b5d724c9 13 | 14 | PODFILE CHECKSUM: 304c455ae59285580715203467589fe299ef0069 15 | 16 | COCOAPODS: 1.1.1 17 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import CPCollectionViewWheelLayoutSwift 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Parsifal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CPCollectionViewWheelLayoutSwift 2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 |

10 | 11 | [![CI Status](http://img.shields.io/travis/ParsifalC/CPCollectionViewWheelLayoutSwift.svg?style=flat)](https://travis-ci.org/Parsifal/CPCollectionViewWheelLayoutSwift) 12 | [![Version](https://img.shields.io/cocoapods/v/CPCollectionViewWheelLayoutSwift.svg?style=flat)](http://cocoapods.org/pods/CPCollectionViewWheelLayoutSwift) 13 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 14 | [![License](https://img.shields.io/cocoapods/l/CPCollectionViewWheelLayoutSwift.svg?style=flat)] 15 | (http://cocoapods.org/pods/CPCollectionViewWheelLayoutSwift) 16 | [![Platform](https://img.shields.io/cocoapods/p/CPCollectionViewWheelLayoutSwift.svg?style=flat)](http://cocoapods.org/pods/CPCollectionViewWheelLayoutSwift) 17 | 18 | ## Example 19 | 20 | To run the example project, clone the repo, and run `pod install` from the Example directory first.[You can view it from Appetize](https://appetize.io/app/k20jdwcyuh8cmjjwyqyq8fen8g?device=iphone6s&scale=75&orientation=portrait&osVersion=9.3) 21 | 22 | ## Requirements 23 | - **Swift3** 24 | - **Xcode 8.1+** 25 | - **iOS 8.0+** 26 | 27 | ## Installation 28 | CPCollectionViewWheelLayoutSwift supports multiple methods for installing the library in a project. 29 | ### Installation with CocoaPods 30 | CPCollectionViewWheelLayoutSwift is available through [CocoaPods](http://cocoapods.org). To install 31 | it, simply add the following line to your Podfile: 32 | 33 | ```ruby 34 | pod "CPCollectionViewWheelLayoutSwift" 35 | ``` 36 | ### Installation with Carthage 37 | [Carthage](https://github.com/Carthage/Carthage) is supported as well.To install 38 | it, add the following line to your Cartfile, then Drag the Framework to your Project: 39 | 40 | ```ruby 41 | github "ParsifalC/CPCollectionViewWheelLayoutSwift" 42 | ``` 43 | ### Install manually 44 | 1. Clone OR Download this repo. 45 | 2. Drag **"CPCollectionViewWheelLayoutSwift.swift"** to your project. 46 | 47 | ## USAGE 48 | 49 | Just config your CollectionView with this layout: 50 | ```Swift 51 | let configuration = CPWheelLayoutConfiguration.init(withCellSize: CGSize.init(width: 100, height: 100), radius: 200, angular: 20, wheelType:wheelType) 52 | let wheelLayout = CPCollectionViewWheelLayout.init(withConfiguration: configuration) 53 | let colletionView = UICollectionView.init(frame: view.frame, collectionViewLayout:wheelLayout) 54 | ``` 55 | 56 | Support 8 types layout: 57 | 58 | ```Swift 59 | public enum CPWheelLayoutType:Int { 60 | case leftBottom = 0 61 | case rightBottom 62 | case leftTop 63 | case rightTop 64 | case leftCenter 65 | case rightCenter 66 | case topCenter 67 | case bottomCenter 68 | } 69 | ``` 70 | 71 | Customize your layout: 72 | 73 | ```Swift 74 | public struct CPWheelLayoutConfiguration { 75 | public var cellSize:CGSize 76 | public var radius:Double 77 | public var angular:Double 78 | public var fadeAway:Bool 79 | public var zoomInOut:Bool 80 | public var maxContentHeight:Double 81 | public var contentHeigthPadding:Double 82 | } 83 | ``` 84 | 85 | See more in Example project. 86 | 87 | ## Author 88 | 89 | Parsifal, zmw@izmw.me 90 | 91 | ## License 92 | 93 | CPCollectionViewWheelLayoutSwift is available under the MIT license. See the LICENSE file for more info. 94 | -------------------------------------------------------------------------------- /ScreenShot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParsifalC/CPCollectionViewWheelLayoutSwift/292ea66e8a23250a2b626c644fc11f04a4c1a587/ScreenShot.png -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------