Refreshing makes the UITableView disappear
BalestraPatrick opened this issue · 3 comments
Hello,
The animation looks amazing but I can't get it to work. This is my code:
let loadingView = DGElasticPullToRefreshLoadingViewCircle()
loadingView.tintColor = UIColor.whiteColor()
tableView.dg_addPullToRefreshWithActionHandler({ [weak self] in
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(1.5 * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), {
self?.tableView.dg_stopLoading()
})
}, loadingView: loadingView)
tableView.dg_setPullToRefreshFillColor(UIColor().menuDarkBlueColor())
tableView.dg_setPullToRefreshBackgroundColor(view.backgroundColor!)
Even if I remove the dispatch_after
, as soon as I release the UIScrollView of the tableView, it completely disappears from the hierarchy. As you can see from these screenshots, the UITableView is removed from the hierarchy. Could this be due to a bug in your library?
The first screenshot is before reloading, the second one is while the pull to refresh animation is in course and the last is when the UIScrollView is released. You can find my source code here: https://github.com/BalestraPatrick/Tweetometer
First
Second
Third
Hello,
Are you doing your layout in code or you are using storyboard and constraints?
I'm using Storyboard to set up my UITableView.
Then you can have a look at issue #1, people were facing the same issue. It was happening because of my implementation "force stop scrolling animation". I think this function is not needed anymore and we can get rid of that. I will try to test it more this weekend and update pod.