簡體   English   中英

iPhone UIPickerView無法在設備上設置動畫

[英]iPhone UIPickerView not animating on device

我有一個非常簡單的屏幕,其中包含用於執行轉換的2個組件UIPickerView。 我要做的就是更換一個卷軸時,我會使用動畫自動將另一個卷軸移動到合適的位置。

所以,我有這個:

- (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];
}

這可以在模擬器中完美運行,並具有預期的平滑動畫,但是在設備上仍然可以運行,但是沒有動畫。

有任何想法嗎?

謝謝

我認為您必須從低於sdk的最低水平獲得構建。

將基本SDK更改為3.1

在xcode中選擇在目標文件夾下選擇應用

然后雙擊它

在構建選項卡中鍵入“部署”

ios部署目標是ios 3.1或您的確切設備版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM