标签:
开发中用到UIPickerView显示和隐藏的动画.随手记一下
第一步:写一个动画方法
- (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]; }]; }
标签:
原文地址:http://blog.csdn.net/broccoliii/article/details/44964383