Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug where the userInteractionEnabled property of the animating …

…view was clobbered.
  • Loading branch information...
commit a0b37500f941deb917cdc406c3a9c093814fbd9f 1 parent 05ebf4a
@neror authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 Classes/FTAnimationManager.m
View
5 Classes/FTAnimationManager.m
@@ -53,6 +53,7 @@ of this software and associated documentation files (the "Software"), to deal
NSString *const kFTAnimationIsChainedKey = @"kFTAnimationIsChainedKey";
NSString *const kFTAnimationNextAnimationKey = @"kFTAnimationNextAnimationKey";
NSString *const kFTAnimationPrevAnimationKey = @"kFTAnimationPrevAnimationKey";
+NSString *const kFTAnimationWasInteractionEnabledKey = @"kFTAnimationWasInteractionEnabledKey";
@interface FTAnimationManager ()
@@ -432,6 +433,7 @@ - (CAAnimation *)flyOutAnimationFor:(UIView *)view duration:(NSTimeInterval)dura
- (void)animationDidStart:(CAAnimation *)theAnimation {
UIView *targetView = [theAnimation valueForKey:kFTAnimationTargetViewKey];
+ [theAnimation setValue:[NSNumber numberWithBool:targetView.userInteractionEnabled] forKey:kFTAnimationWasInteractionEnabledKey];
[targetView setUserInteractionEnabled:NO];
if([[theAnimation valueForKey:kFTAnimationType] isEqualToString:kFTAnimationTypeIn]) {
@@ -446,7 +448,8 @@ - (void)animationDidStart:(CAAnimation *)theAnimation {
}
- (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)finished {
UIView *targetView = [theAnimation valueForKey:kFTAnimationTargetViewKey];
- [targetView setUserInteractionEnabled:YES];
+ BOOL wasInteractionEnabled = [[theAnimation valueForKey:kFTAnimationWasInteractionEnabledKey] boolValue];
+ [targetView setUserInteractionEnabled:wasInteractionEnabled];
if([[theAnimation valueForKey:kFTAnimationType] isEqualToString:kFTAnimationTypeOut]) {
[targetView setHidden:YES];
Please sign in to comment.
Something went wrong with that request. Please try again.