Permalink
Browse files

Added options params to all animations block - fixes warning for ios4

  • Loading branch information...
1 parent 05d714f commit f3c5656c5bb0b03eb18427087392712f382a9dda @gmoledina committed Dec 13, 2011
Showing with 14 additions and 8 deletions.
  1. +14 −8 GMGridView/API/GMGridView.m
@@ -34,7 +34,7 @@
static const NSUInteger kTagOffset = 50;
static const CGFloat kDefaultAnimationDuration = 0.3;
-static const UIViewAnimationOptions kDefaultAnimationOptions = UIViewAnimationOptionBeginFromCurrentState;
+static const UIViewAnimationOptions kDefaultAnimationOptions = UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction;
//////////////////////////////////////////////////////////////
@@ -520,7 +520,7 @@ - (void)sortingAutoScrollMovementCheck
{
[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
- options:kDefaultAnimationOptions | UIViewAnimationOptionAllowUserInteraction
+ options:kDefaultAnimationOptions
animations:^{
_scrollView.contentOffset = offset;
}
@@ -594,7 +594,7 @@ - (void)sortingMoveDidStopAtPoint:(CGPoint)point
[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
- options:0
+ options:kDefaultAnimationOptions
animations:^{
_sortMovingItem.transform = CGAffineTransformIdentity;
_sortMovingItem.frame = newFrame;
@@ -902,9 +902,15 @@ - (void)transformingGestureDidFinish
_transformingItem.backgroundColor = [[UIColor darkGrayColor] colorWithAlphaComponent:0.9];
_transformingItem.fullSizeView.transform = CGAffineTransformMakeRotation(rotationValue);
- [UIView animateWithDuration:kDefaultAnimationDuration animations:^{
- _transformingItem.fullSizeView.transform = CGAffineTransformIdentity;
- }];
+
+ [UIView animateWithDuration:kDefaultAnimationDuration
+ delay:0
+ options:kDefaultAnimationOptions
+ animations:^{
+ _transformingItem.fullSizeView.transform = CGAffineTransformIdentity;
+ }
+ completion:nil
+ ];
_inFullSizeMode = YES;
@@ -1000,7 +1006,7 @@ - (GMGridViewCell *)newItemSubViewForPosition:(NSInteger)position
// To make sure the frame is not animated
[UIView animateWithDuration:0
delay:0
- options:UIViewAnimationOptionOverrideInheritedDuration
+ options:kDefaultAnimationOptions | UIViewAnimationOptionOverrideInheritedDuration
animations:^{
cell.frame = frame;
cell.contentView.frame = cell.bounds;
@@ -1091,7 +1097,7 @@ - (void)recomputeSize
[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
- options:kDefaultAnimationOptions | UIViewAnimationOptionAllowUserInteraction
+ options:kDefaultAnimationOptions
animations:^{
if (!CGSizeEqualToSize(_scrollView.contentSize, contentSize))
{

0 comments on commit f3c5656

Please sign in to comment.