简体   繁体   English

iPhone UIPickerView无法在设备上设置动画

[英]iPhone UIPickerView not animating on device

I've got a very simple screen with a 2 component UIPickerView used to perform a conversion. 我有一个非常简单的屏幕,其中包含用于执行转换的2个组件UIPickerView。 All I'm doing is when one reel is changed I automatically move the other to an appropriate position, using animation. 我要做的就是更换一个卷轴时,我会使用动画自动将另一个卷轴移动到合适的位置。

So, I've got this: 所以,我有这个:

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
    // adjust the other component accordingly
    [pickerView selectRow:row 
              inComponent:(component == kPickerComponent1) ? kPickerComponent2 : kPickerComponent1
                 animated:YES];
}

This works perfectly in the simulator, with a smooth animation as expected, however on the device it still works but without the animation. 这可以在模拟器中完美运行,并具有预期的平滑动画,但是在设备上仍然可以运行,但是没有动画。

Any ideas? 有任何想法吗?

Thanks 谢谢

i think u have to get build from below minimum level of sdk. 我认为您必须从低于sdk的最低水平获得构建。

change base sdk to 3.1 将基本SDK更改为3.1

select in xcode select app below the target folder 在xcode中选择在目标文件夹下选择应用

then double click it 然后双击它

in build tab type "deploy" 在构建选项卡中键入“部署”

ios deployment target to ios 3.1 or ur exact device version. ios部署目标是ios 3.1或您的确切设备版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM