GMGridView icon indicating copy to clipboard operation
GMGridView copied to clipboard

Layout bug when reloading Cell with fade animation

Open blackgold9 opened this issue 12 years ago • 5 comments

When i reload a cell in the grid with the crossfade animation, the cell jumps to 0,0, and then fades back to it's correct location very quickly. It's easy to see if you slow down the simulator animations.

See video: http://smu.gs/xehYmj

blackgold9 avatar Mar 13 '12 18:03 blackgold9

Yep, noticed something like this too. Feel free to send a pull request!

steipete avatar Mar 13 '12 18:03 steipete

Glad it's not just me screwing up somewhere. I'll take a look after i ship :)

blackgold9 avatar Mar 13 '12 19:03 blackgold9

I have the exact same issue..

pfbns avatar Apr 05 '12 14:04 pfbns

+1

futuretap avatar May 02 '12 13:05 futuretap

Sorry, I usually just make use of the github rather than participating in the development.

But I actually managed to fix this issue (on the fade animation). (I only fixed it on the method I make use of it may be a consistent problem -- see if it happens everywhere)

Class: GMGridView.m

Method:

  • (void)reloadObjectAtIndex:(NSInteger)index withAnimation:(GMGridViewItemAnimation)animation

Explanation: The 'currentView' cell is being painted in the 0,0 position. Just don't animate its transition out and the replacement cell will correctly be painted over it.

(i.e. comment out the following line:) // currentView.alpha = 0;

and poof, problem gone. Hope it helps.

ghost avatar May 23 '12 04:05 ghost