Created
July 22, 2011 01:04
-
-
Save tolmasky/1098618 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| UIImageView * imageView = (UIImageView *)aGestureRecognizer.view; | |
| draggedView = [[UIImageView alloc] initWithImage:[imageView image]]; | |
| UIWindow * window = [self.view window]; | |
| BOOL areEnabled = [UIView areAnimationsEnabled]; | |
| [UIView setAnimationsEnabled:NO]; | |
| draggedView.frame = [imageView.superview convertRect:imageView.frame toView:window]; | |
| [window addSubview:draggedView]; | |
| [UIView setAnimationsEnabled:areEnabled]; | |
| [UIView beginAnimations:@"" context:NULL]; | |
| CGPoint center = [aGestureRecognizer locationInView:window]; | |
| center.y -= 20.0; | |
| draggedView.center = center; | |
| draggedView.transform = CGAffineTransformIdentity; | |
| [UIView commitAnimations]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment