This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
private final class ScrollViewBehaviorContainer: NSObject, UIScrollViewDelegate { | |
// MARK: Properties | |
var behaviors = [ScrollViewBehavior]() | |
// MARK: UIScrollViewDelegate | |
func scrollViewDidScroll(_ scrollView: UIScrollView) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol ScrollViewBehavior { | |
func afterScrolling(_ scrollView: UIScrollView) | |
func beforeDraggingBegins(_ scrollView: UIScrollView) | |
func beforeDraggingEnds(_ scrollView: UIScrollView, velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) | |
func afterDraggingEnds(_ scrollView: UIScrollView, wilDecelerate: Bool) | |
func afterScrollingToTop(_ scrollView: UIScrollView) | |
func beforeDeceleratingBegins(_ scrollView: UIScrollView) | |
func afterDeceleratingEnds(_ scrollView: UIScrollView) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class ScrollIndicatorBehavior { | |
// MARK: Properties | |
var leftInset: CGFloat { | |
didSet { updateShadowFrame() } | |
} | |
var rightInset: CGFloat { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am delannoyk on github. | |
* I am delannoyk (https://keybase.io/delannoyk) on keybase. | |
* I have a public key whose fingerprint is 483C DFBE 2AE2 41DD BE6E 2A7F B62C F46D 65D8 F6B5 | |
To claim this, I am signing this object: |