Flipping View transition becomes clunky when using UIPickerViews with a large number of elements
Posted
by user302246
on Stack Overflow
See other posts from Stack Overflow
or by user302246
Published on 2010-03-26T02:59:40Z
Indexed on
2010/03/26
3:03 UTC
Read the original article
Hit count: 336
I have a very simple app created with the Utility Application project template on XCode. My MainView has two UIPickerView components and two buttons. The FlipSideView has another UIPickerView.
The pickers on the main view each have 4 segments and each segment has 8 rows. The picker on the flip side has just 1 segment with 8 rows. All rows on all pickers are just text.
With just this setup, pressing the button to flip the view back and forth displays a noticeable delay before the animation actually starts, and then the animation actually seems to go faster than what it should, like it's trying to make up for the lost time.
I removed the pickers in interface builder and loaded the app on the phone and the animation now seems natural. I also tried just one picker (the flipside one) and things still seem normal. So my current theory is that the number of objects involved in the main view is the cause. The thing is that I don't think it's that many (4 x 8 x 2 = 64), but I could be completely wrong. This is pretty much my first app so maybe I'm just doing something grossly wrong, or maybe the phone is has a lot more limited processing than I thought.
I am thinking of creating the picker views with pickerView:viewForRow:forComponent:reusingView: to see if this hopefully performs better, but I'm not sure if this is just a waste of time.
Any suggestions?
Thanks Ruy
P.S.: Testing on a 3G phone on 3.1.2
© Stack Overflow or respective owner