CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

ScrollViewDelegateProxy 1.0.0

ScrollViewDelegateProxy 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by hailiang.song.



  • By
  • hailiang.song

ScrollViewDelegateProxy

Make it possible to set multiple delegates for a UIScrollView.

It’s probably useful when you can’t change a UIScrollView’s delegate implementation(maybe it’s in a framework), but you really want to add some codes in the delegate implementation. Now, you can try this. It’s quite simple.

Installation

Manual

Add ScrollViewDelegateProxy.swift to your project

Usage

Just call scrollview.addDelegate method to add a new delegate to a scrollView.

Notice:

  • This method should be called after you set the scrollView.delegate property. If can’t, you need to call reloadDelegateProxy method after you set the scrollView.delegate property.
  • This lib will ignore those Non-Void delegate methods in current version. It means that you can’t get those callbacks. I don’t have a good solution for this rightnow, any idea is especially expected.