Swiftpack.co - bdolewski/BDFadingScrollView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by bdolewski.
bdolewski/BDFadingScrollView 1.0.0
It's Swift-ified fork of stephsharp/SSFadingScrollView
⭐️ 0
🕓 4 years ago
iOS
.package(url: "https://github.com/bdolewski/BDFadingScrollView.git", from: "1.0.0")

BDFadingScrollView

It's Swift-ified fork of SSFadingScrollView

A UIScrollView subclass that fades the leading and/or trailing edges of a scroll view to transparent. It animates the gradient in and out based on the current content offset, and uses a mask to fade the scroll view content without also fading the scroll bars.

Screenshots by Stephanie Sharp

SSFadingScrollView screenshots

Features

  • ☑ Fade top and/or bottom of vertical scroll view
  • ☑ Fade left and/or right of horizontal scroll view
  • ☑ Animated fade in and out (based on content offset) with customizable duration
  • ☑ Adjustable gradient size
  • ☑ Scroll bars don't fade out with the scroll view content
  • ☑ IBInspectable properties allow you to set up your fading scroll view entirely in Interface Builder. (See the demo project for an example.)

Properties

fadeLeadingEdge

Fade leading edge of fade axis. Default is true.

fadeTrailingEdge

Fade trailing edge of fade axis. Default is true.

fadeSize

Size of gradient. Default is 30.

fadeDuration

Duration of fade in & out. Default is 0.3 seconds.

maskScrollBars

Default is true. Scroll bars are masked so they don't fade with the scroll view content. Set to false to fade out the scroll bars along with the content.

Installation

Swift Package Manager

Add following line to your dependencies in Package.swift file in your project:

.package(url: "https://github.com/bdolewski/BDFadingScrollView", from: "1.0.0")

Manual installation

Just copy file BDFadingScrollView.swift into Xcode and have fun 🙂

Acknowledgements

With thanks to:

Photos in the demo project were sourced from Unsplash.

License

BDFadingScrollView is released under the MIT license. See LICENSE for details.

GitHub

link
Stars: 0
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.0.0
4 years ago

SSFadingScrollView re-written in Swift. No features dropped or deprecated. For iOS 11+.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics