eggswift / pull-to-refresh

#Busy Re-Building....# An easy way to use pull to refresh and infinite scrolling in Swift. Pod 'ESPullToRefresh'
MIT License
1.82k stars 252 forks source link

Type 'UIScollView' does not conform to protocol 'ESExtensionsProvider' #85

Open cherishloveyou opened 7 years ago

cherishloveyou commented 7 years ago

我用源码会出现这个错误 用framework 就不会 我猜应该与UIScollView某个扩展冲突了 不知道楼主知道原因么?

还有一个严重的问题 用 isIgnoreObserving变量判断状态并不准确 导致previousOffset刷新动画复原会受影响 添加print测试 可以打印出来


    override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
        if context == &ESRefreshComponent.context {
            guard isUserInteractionEnabled == true && isHidden == false else {
                return
            }
            if keyPath == ESRefreshComponent.contentSizeKeyPath {
                if isIgnoreObserving == false {
                    sizeChangeAction(object: object as AnyObject?, change: change)
                }
            } else if keyPath == ESRefreshComponent.offsetKeyPath {
                if isIgnoreObserving == false {
                    offsetChangeAction(object: object as AnyObject?, change: change)
                     if isIgnoreObserving {
                        print("qqqqqq")
                    }
                }
            }
        } else {

        }
    }
farismhmd1 commented 3 years ago

i am getting the same issue. any solution?