Created
May 21, 2016 14:43
-
-
Save StuartMorris0/5ce1ef8f7a71c1002fb090d3971689a9 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
[UIView animateKeyframesWithDuration:5.0 delay:0.0 options:0 animations:^{ | |
[UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.5 animations:^{ | |
self.verticalPosition.constant = 200.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
[UIView addKeyframeWithRelativeStartTime:0.5 relativeDuration:0.25 animations:^{ | |
self.verticalPosition.constant = 50.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
[UIView addKeyframeWithRelativeStartTime:0.75 relativeDuration:0.125 animations:^{ | |
self.verticalPosition.constant = 200.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
[UIView addKeyframeWithRelativeStartTime:0.875 relativeDuration:0.0625 animations:^{ | |
self.verticalPosition.constant = 50.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
[UIView addKeyframeWithRelativeStartTime:0.9375 relativeDuration:0.03125 animations:^{ | |
self.verticalPosition.constant = 200.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
[UIView addKeyframeWithRelativeStartTime:0.96875 relativeDuration:0.015625 animations:^{ | |
self.verticalPosition.constant = 50.0; | |
[self.view layoutIfNeeded]; | |
}]; | |
} completion:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment