ScrollyPolyView 0.3.0

ScrollyPolyView 0.3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2016
SPMSupports SPM

Maintained by Mike Kavouras.



  • By
  • Mike Kavouras

ScrollyPolyView

Example

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

https://github.com/mikekavouras/ScrollyPolyView/blob/master/assets/scroll.gif

Installation

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

pod "ScrollyPolyView"

Usage

@IBOutlet weak var scrollView: ScrollyPolyView!
@IBOutlet weak var imageView: UIImageView! // the view your masking


lazy var masks: [UIImageView] = {
  let images = [UIImage(named: "cat")!, UIImage(named:"circle")!, UIImage(named: "heart")!]
  let imageViews = images.map { UIImageView(image: $0) }
  return imageViews
}()

override func viewDidLoad() {
  // the important lines
  scrollView.masks = masks
  imageView.layer.mask = scrollView.scrollLayer

  super.viewDidLoad()
}

Author

Mike Kavouras

License

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