UIView 弹出动画

// 展开动画
- (void)beginAnimations
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    [UIView beginAnimations:nil context:context];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.6];//动画时间长度,单位秒,浮点数
    myView.frame = CGRectMake(0, 0, 320, 110);
    [UIView commitAnimations];
}

// 收起动画
- (void)endAnimations
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    [UIView beginAnimations:nil context:context];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.6];//动画时间长度,单位秒,浮点数
    myView.frame = CGRectMake(0, -110, 320, 110);
    [UIView commitAnimations];
}
原文地址:https://www.cnblogs.com/joesen/p/3517974.html