Skip to content

A layout that can set freeze coloums number and row numbers in UICollectionView., and scroll both Horizontal and Vertical direct.

License

Notifications You must be signed in to change notification settings

KevinZhouRafael/ZKCollectionViewFreezeLayout

Repository files navigation

ZKCollectionViewFreezeLayout

Version License Platform

Description

The ZKCollectionViewFreezeLayout extends UICollectionViewLayout.

Support both Horizontal and Vertical scroll direct.

Can set freeze coloums numbers and rows numbers.

Example

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

The example codes looks like.

let layout = ZKCollectionViewFreezeLayout()
layout.delegate = self
layout.freezeColum = 3
layout.freezeRow = 2
layout.itemSize = CGSize(width: 70, height: 70)
        
        
collectionView.setCollectionViewLayout(layout, animated: false)
collectionView.backgroundColor = UIColor.whiteColor()
collectionView.bounces = false

Simple image

Requirements

  • iOS 8.0+
  • Xcode 10.2
  • Swift 5

Installation

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

pod "ZKCollectionViewFreezeLayout"

Author

Rafael Zhou

License

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

About

A layout that can set freeze coloums number and row numbers in UICollectionView., and scroll both Horizontal and Vertical direct.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published