1
我試圖運行一個動畫,以便scrollview的contentoffset不斷滾動下來。UIView Animaton重置爲開始
但是,在每次重複之後,它將從原始位置開始動畫並且不會進行。
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationDuration:1.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationRepeatCount: 100];
CGPoint contentOffset = scrollView.contentOffset;
contentOffset.y += 50;
scrollView.contentOffset = contentOffset;
scrollView.transform = CGAffineTransformIdentity;
[UIView commitAnimations];
有什麼想法嗎?
原因,我想這樣做,這種方式是模擬控制有點像老虎機..很像UIPickerView ..但因爲我們無法在視圖方面做太多的自定義,我這樣做的滾動視圖滾動數字。在最新版本的SDK中。根據視圖不允許對UIPickerView進行更改。 – 2010-10-20 01:16:57
雖然很棒,但我明白了。謝謝! – 2010-10-20 01:21:24