WHPageCollectionView 0.1.1

WHPageCollectionView 0.1.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by [email protected].



  • By
  • wenhe-liu

WHPageCollectionView

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

WHPageCollectionView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "WHPageCollectionView"
        //设置自定义表情/键盘布局
        let layout = WHPageCollectionViewLayout()
        //设置布局属性
        layout.scrollDirection = .horizontal
        layout.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10)

        //设置title标题格式
        let style = WHPageStyle()
        style.isShowBottomLine = true

        //设置pageCollectionView的位置
        let frame = CGRect(x: 0, y: 20, width: view.bounds.width, height: 300)
        let page = WHPageCollectionView(frame: frame, titles: ["表情", "专属", "热门", "美女"], layout: layout, style: style, isTitleInTop: true)
        //设置数据源
        page.dataSource = self
        view.addSubview(page)
        //注册cell
        page.register(cellClass: UICollectionViewCell.self, forCellWithReuseIdentifier: cellID)

Author

wenhe-liu, [email protected]

License

WHPageCollectionView is available under the MIT license. See the LICENSE file for more info.