Question

I have a UITableView that I want to have a scrolling effect through all cells in the table and then move all content off the screen and then animate the return off the first cell. I'm doing this animation as a clearing method for all the content in the table cells if the user wants to start over.

I have all this working, however when I run this on my iPhone 5 when the contentOffset animation starts it causes a jitter motion where the cells look like they go up and down before it then starts to scroll the content off the screen. It looks fine in the simulator. Why is this happening? Do I have to use a UIScrollView and add subviews instead off UITableView?

Here is the code I am using:

CGPoint bottomOffset = CGPointMake(0, -self.tableView.contentSize.height);
[self.tableView setContentOffset:bottomOffset animated:YES];

What is interesting is that if I set the offset height to not be as large this choppiness does not happen, but then this does not scroll all the content off the screen.

I've tried animating the table view frame off the screen and this does work, but does not give me the animation of scrolling through all the content first, which is the effect I'm going after.

Anyone done this before, what am I doing wrong here? The effect I'm trying to mimic is from an app called WillCall (https://www.getwillcall.com/) when you click in and out of an artists details you will see this scrolling effect.

Was it helpful?

Solution

Turns out that I had multiple animations competing for resources and this was causing the jitter in the animations. I had to place delay blocks around a bunch of other methods to wait till the animation was complete.

Take away and future mental note is if there are jitters in your animations then most likely you have multiple animations competing for resources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top