UITableViewCell rolling animation affects multiple cells

I have a UITableView with custom UITableViewCells. I put animation in didSelectRow for one view in a cell to hide and another to show. When I do this, although it affects other cells, as in the animation it happens to other cells as well.

For example, if I have 20 cells and I select a cell at indexPath 1, the animation happens at indexPath 1, 4, 7, 10, 13, 16, and 19.

CustomCell *cell = (CustomCell *)[tableView cellForRowAtIndexPath:indexPath];

[UIView beginAnimations:@"moveCell" context:nil];
[UIView setAnimationDuration:animationFlipTime];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:cell cache:NO];
[cell.view1 setHidden:NO];
[cell.view2 setHidden:YES];
[UIView commitAnimations];

      

I have also tried other animation methods such as [UIView animateWithDuration...]

and they all display the same result.

reference

+3
ios uitableview ios8 core-animation uiview


source to share


No one has answered this question yet

Check out similar questions:

1473
Using Auto Layout in UITableView for Dynamic Cell Layouts and Variable Row Heights
299
UITableView cell selected color?
241
How can I use automatic layout to move other views when the view is hidden?
155
UITableViewCell mobility disappears when cell is selected
91
Strange behavior of uitableview in iOS11. Cells scroll with push navigation animation
1
UITableViewCell Animation inside a custom cell. But animated with other UIView cells
1
First access arrow of UITableViewCell not showing
0
How do I assign a custom extra parameter next to "NSIndexPath" when UITableViewCell is selected?
0
Custom UITableViewCell only handle one cell
0
Rotate UIImageView UITableViewCell using UIViewAnimation (my app hangs !!)



All Articles
Loading...
X
Show
Funny
Dev
Pics