Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGRect frame = Guy.frame;
- frame.origin.x = frame.origin.x - 0;
- frame.origin.y = frame.origin.y - 7;
- [UIView beginAnimations:nil context:nil];
- [UIView setAnimationDuration:0.60];
- Guy.frame = frame;
- [UIView commitAnimations];
- [UIView animateWithDuration:1.0
- delay: 0.0
- animations:^{
- image.frame = CGRectMake(image.frame.origin.x, image.frame.origin.y-7, image.frame.size.width, image.frame.size.height);
- }
- completion:^(BOOL finished){
- // move it ba
- [UIView animateWithDuration:1.0
- delay: 1.0
- options:UIViewAnimationOptionCurveEaseOut
- animations:^{
- image.frame = CGRectMake(image.frame.origin.x, image.frame.origin.y+7, image.frame.size.width, image.frame.size.height);
- }
- completion:nil];
- }];
- CGRect frame = Guy.frame;
- [UIView animateWithDuration:0.6 delay: 0 options:UIViewAnimationCurveEaseInOut animations: ^{
- Guy.frame = CGRectMake(frame.origin.x, frame.origin.y - 7,
- frame.size.width, frame.size.height);
- } completion: ^(BOOL finished) {
- if (finished) {
- [UIView animateWithDuration:0.6 delay: 0 options:UIViewAnimationCurveEaseInOut animations: ^{
- Guy.frame = CGRectMake(frame.origin.x, frame.origin.y + 7,
- frame.size.width, frame.size.height);
- }];
- }
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement