To animate the shortcut up, down, I usually did this:
[UIView animateWithDuration:0.2
delay:0
options:UIViewAnimationOptionCurveEaseIn
animations:^{
self.myLabel.transform = CGAffineTransformMakeTranslate(0, -100);
}
completion:^(BOOL finished) {
[UIView animateWithDuration:0.2
delay:0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.myLabel.transform = CGAffineTransformMakeTranslate(0,0);
}
completion:nil];
}];
Is this what you are looking for?
Edit
, , , ?
self.mylabel.alpha = 0;
[UIView animateWithDuration:0.2
delay:0
options:UIViewAnimationOptionCurveEaseIn
animations:^{
self.myLabel.transform = CGAffineTransformMakeTranslate(0, 100);
self.myLabel.alpha = 1;
}
completion:^(BOOL finished) {
[UIView animateWithDuration:0.2
delay:0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
self.myLabel.transform = CGAffineTransformMakeTranslate(0,1000);
self.myLabel.alpha = 0;
}
completion:nil];
}];
, x, y, width, height . , 100 y Y + 100.