Navigation Menu

Skip to content

Commit

Permalink
Added options params to all animations block - fixes warning for ios4
Browse files Browse the repository at this point in the history
  • Loading branch information
gmoledina committed Dec 13, 2011
1 parent 05d714f commit f3c5656
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions GMGridView/API/GMGridView.m
Expand Up @@ -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;


//////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -520,7 +520,7 @@ - (void)sortingAutoScrollMovementCheck
{
[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
options:kDefaultAnimationOptions | UIViewAnimationOptionAllowUserInteraction
options:kDefaultAnimationOptions
animations:^{
_scrollView.contentOffset = offset;
}
Expand Down Expand Up @@ -594,7 +594,7 @@ - (void)sortingMoveDidStopAtPoint:(CGPoint)point

[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
options:0
options:kDefaultAnimationOptions
animations:^{
_sortMovingItem.transform = CGAffineTransformIdentity;
_sortMovingItem.frame = newFrame;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1091,7 +1097,7 @@ - (void)recomputeSize

[UIView animateWithDuration:kDefaultAnimationDuration
delay:0
options:kDefaultAnimationOptions | UIViewAnimationOptionAllowUserInteraction
options:kDefaultAnimationOptions
animations:^{
if (!CGSizeEqualToSize(_scrollView.contentSize, contentSize))
{
Expand Down

0 comments on commit f3c5656

Please sign in to comment.