UIPickerView显示和隐藏的动画

2021-10-29 14:13:11 浏览数 (1)

代码语言:javascript复制
- (void)ViewAnimation:(UIView*)view willHidden:(BOOL)hidden {

    [UIView animateWithDuration:0.3 animations:^{  
        if (hidden) {  
            view.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen].bounds.size.width, view.bounds.size.height);  
        } else {  
            [view setHidden:hidden];  
            view.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height - view.bounds.size.height, [UIScreen mainScreen].bounds.size.width, view.bounds.size.height);  
        }  
    } completion:^(BOOL finished) {  
        [view setHidden:hidden];  
    }];  
}  </pre> 


 UIPickerView显示和隐藏的动画.

0 人点赞