Browse files

GMGridView: Fixed insert cell fade animation

fade-in the cell after the cell move animation made room for it
  • Loading branch information...
1 parent a8b0f07 commit 3f61a66afb84b406696f6d8c1959590a6d9d4aca Ortwin Gentz committed May 2, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 GMGridView/GMGridView.m
View
8 GMGridView/GMGridView.m
@@ -1594,6 +1594,14 @@ - (void)insertObjectAtIndex:(NSInteger)index withAnimation:(GMGridViewItemAnimat
oldView.tag = oldView.tag + 1;
}
+ if (animation & GMGridViewItemAnimationFade) {
+ cell.alpha = 0;
+ [UIView beginAnimations:nil context:NULL];
+ [UIView setAnimationDelay:kDefaultAnimationDuration];
+ [UIView setAnimationDuration:kDefaultAnimationDuration];
+ cell.alpha = 1.0;
+ [UIView commitAnimations];
+ }
[self addSubview:cell];
}

0 comments on commit 3f61a66

Please sign in to comment.