Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slowly swiping down to refresh on refreshControl of UITableViewController causes view to jump down

I used to have a UITableView in a UIViewController. I would put a UIRefreshControl on the UITableView and on the very last bit of swiping down to refresh, the UITableView would quickly jump down.

All answers voiced the same: Undocumented/unexpected behavior (being able to use UIRefreshControl with a UITableView) yields such results. To mitigate this, I used a ContainerView to embed a UITableViewController in a UIViewController.

I have nearly solved this issue, but... if I swipe down slow enough, the problem persists.

Is there any way to mitigate this, or am I forced to live with it?

Video: http://streamable.com/8suq

Notice the first few times I swipe down look absolutely fine because I do it fast enough, but towards the end of the video I really slow it down and you notice the jump in question.

like image 443
David Avatar asked Sep 12 '15 11:09

David


1 Answers

I notice that you have a mouse cursor in that video. You cannot judge graphic performance for animations in the simulator, it will not perform the same as on an actual device.

On a device you will get much better performance and a much better frames per second rate. I've seen this to be very noticable when using SpriteKit whilst learning to develop games lately.

I've only used the UIRefreshControl a couple of times previously in a UITableViewController and not noticed any major issues before. Since then I've been using other libraries such as https://github.com/samvermette/SVPullToRefresh.

Try your app on a physical device and in the meantime I will try to replicate your issue and add my findings in here

like image 98
Scriptable Avatar answered Nov 15 '22 05:11

Scriptable