Shopify / FunctionalTableData

Declarative UITableViewDataSource implementation
MIT License
365 stars 30 forks source link

Adds support for setting a UIScrollViewDelegate #137

Closed g-Off closed 5 years ago

g-Off commented 5 years ago

This is for use instead of the closure based mechanism

Uses NSObject's forwardingTarget to send UIScrollViewDelegate based messages to a separate object and removes the need for Functional(Table|Collection)Data to implement and forward all of the various UIScrollViewDelegate based messages itself. Backwards compatibility is maintained with a separate internal object that maintains the closures and will call them (so long as a delegate implementing the same method doesn't exist). In future we can remove this backwards compatible support and rely solely on the UIScrollViewDelegate.