Latest0.2.1
Homepagehttps://github.com/ikemai/ScaledVisibleCellsCollectionView
LicenseMIT
Platformsios 8.0, requires ARC
FrameworksUIKit
Authors

CI Status
Version
License
Platform

ScaledVisibleCellsCollectionView is UICollectionView extension.
ScaledVisibleCellsCollectionView is Check visible cells position. And setting cell’s scale and alpha.

Demo

Horizontal ( center / right / left )

Gif Gif Gif

Vertical ( center / top / bottom )

Gif Gif Gif

Usage

Cocoapods

To run the example project, clone the repo, and run pod install from the Example directory first.
Add the following to your Podfile:

pod "ScaledVisibleCellsCollectionView"
use_frameworks!

Note: the use_frameworks! is required for pods made in Swift.

Example

  • Set propertis
let collectionView = UICollectionView(frame: view.bounds)
view.addSubview(collectionView)

collectionView.setScaledDesginParam(scaledPattern: .VerticalCenter, maxScale: 1.2, minScale: 0.5, maxAlpha: 1.0, minAlpha: 0.5)
  • Scale and alpha
func scrollViewDidScroll(scrollView: UIScrollView) {
    collectionView.scaledVisibleCells()
}

Variable

  • Set Scroll direction & position is the most large cell
var scaledPattern: SC_ScaledPattern = .VerticalCenter
public enum SC_ScaledPattern {
case HorizontalCenter
case HorizontalLeft
case HorizontalRight
case VerticalCenter
case VerticalBottom
case VerticalTop
}
  • Set Scale
var maxScale: CGFloat = 1.0
var minScale: CGFloat = 0.5
  • Set Alpha
var maxAlpha: CGFloat = 1.0
var minAlpha: CGFloat = 0.5

Function

  • Set property ( * Please always set )
func setScaledDesginParam(scaledPattern pattern: SC_ScaledPattern, maxScale: CGFloat, minScale: CGFloat, maxAlpha: CGFloat, minAlpha: CGFloat)
  • Set scale for visible cells ( * Please call at any time )
func scaledVisibleCells()

Author

ikemai

License

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

Latest podspec

{
    "name": "ScaledVisibleCellsCollectionView",
    "version": "0.2.1",
    "summary": "TapGestureGenerater is get tap and gesture event.",
    "homepage": "https://github.com/ikemai/ScaledVisibleCellsCollectionView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ikemai": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ikemai/ScaledVisibleCellsCollectionView.git",
        "tag": "0.2.1"
    },
    "source_files": "ScaledVisibleCellsCollectionView/**/*.{h,swift}",
    "requires_arc": true,
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This