Last active
August 29, 2015 14:16
-
-
Save yaakovgamliel/3a36d366f329d9d6ace1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SWIZZLE_ADD_ANIMATION 0 | |
#if DEBUG && SWIZZLE_ADD_ANIMATION | |
+ (void)load { | |
safe_swap_implementation(self, @selector(addAnimation:forKey:), @selector(bb_addAnimation:forKey:)); | |
} | |
- (void)bb_addAnimation:(CAAnimation *)animation forKey:(NSString *)key { | |
// Ignore the stupid phantom text field's cursor animation | |
if ([[[self delegate] superview] isKindOfClass:NSClassFromString(@"UITextSelectionView")] == NO) { | |
NSLog(@"Key: %@, Animation: %@, Layer: %@", key, [animation debugDescription], [self debugDescription]); | |
} | |
[self bb_addAnimation:animation forKey:key]; | |
// if ([animation isKindOfClass:[CATransition class]]) { | |
// NSLog(@"STOP IN THE NAME OF CORE ANIMATION!"); | |
// } | |
// | |
// if ([key isEqualToString:@"contents"]) { | |
// NSLog(@"STOP IN THE NAME OF CORE ANIMATION!"); | |
// } | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment