子类化UIPickerView
并覆盖-scrollAnimationDuration
允许在iOS 5之前更改选择器视图的动画持续时间。有没有人知道在iOS 5中设置选择器视图的动画持续时间的另一个技巧?
这适用于iOS 5之前的版本:
// Subclass of UIPickerView
@implementation SpinDurationView
- (double)scrollAnimationDuration { return 2.7; }
@end
答案 0 :(得分:0)
你试过这个吗?
CGPoint newLogoutCenter = CGPointMake(160, 364);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0f];
pickerview.center = newLogoutCenter;
[UIView commitAnimations];
我将此动画代码用于UIButton。 UILable等。我从未用过UIPickerView。但你可以试试。