CPCollectionViewWheelLayoutSwift
To run the example project, clone the repo, and run pod install from the Example directory first.You can view it from Appetize
RequirementsSwift3
Xcode 8.1+
iOS 8.0+
InstallationCPCollectionViewWheelLayoutSwift supports multiple methods for installing the library in a project.
Installation with CocoaPodsCPCollectionViewWheelLayoutSwift is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Carthage is supported as well.To install
it, add the following line to your Cartfile, then Drag the Framework to your Project:
Clone OR Download this repo.
Drag "CPCollectionViewWheelLayoutSwift.swift" to your project.
USAGEJust config your CollectionView with this layout:
let configuration = CPWheelLayoutConfiguration.init(withCellSize: CGSize.init(width: 100, height: 100), radius: 200, angular: 20, wheelType:wheelType) let wheelLayout = CPCollectionViewWheelLayout.init(withConfiguration: configuration) let colletionView = UICollectionView.init(frame: view.frame, collectionViewLayout:wheelLayout)Support 8 types layout:
public enum CPWheelLayoutType:Int { case leftBottom = 0 case rightBottom case leftTop case rightTop case leftCenter case rightCenter case topCenter case bottomCenter }See more in Example project.
AuthorParsifal, zmw@izmw.me
使用说明详见Github Readme.
Source:https://github.com/ParsifalC/CPCollectionViewWheelLayoutSwift