gontovnik/DGElasticPullToRefresh

Using Storyboard

burakyldz opened this issue · 1 comments

Hi,

I use storyboard but pull to refresh feature doesnt work properly. Circle animation not working, it stop immediately, and table view invisable.

My code here:

` //myTableView = UITableView(frame: ucretsizMaclarTableView.frame, style: .Plain) // This line caused error. (FlexibleWidh & Flexible Height, nil error)
myTableView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]

    let loadingView = DGElasticPullToRefreshLoadingViewCircle()
    loadingView.tintColor = UIColor(red: 78/255.0, green: 221/255.0, blue: 200/255.0, alpha: 1.0)
    myTableView.dg_addPullToRefreshWithActionHandler({ [weak self] () -> Void in
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(10 * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
            self?.myTableView.dg_stopLoading()
        })
        }, loadingView: loadingView)
    myTableView.dg_setPullToRefreshFillColor(UIColor(red: 57/255.0, green: 67/255.0, blue: 89/255.0, alpha: 1.0))
    myTableView.dg_setPullToRefreshBackgroundColor(ucretsizMaclarTableView.backgroundColor!)`

I solved problem with this code:

extension UIScrollView {
func dg_stopScrollingAnimation() {}
}