I've problem with UIDatepicker.In my project while scrolling the date picker,i clicked on select button at a same time and page will navigate on previous screen.after clicking on pick date button page is navigate on pick date screen.but UIPicker is not select the perfect date.

- 937
- 1
- 10
- 39
2 Answers
Older iOS versions had a bug, when if you hide UIPickerView while it's still spinning it stucked in unpredictable position (you could spot that bug even in Apple's clock app, if you spin picker with the speed of light and switch tab or close your app), but, seems since iOS 6 that's not the case (nope, just checked on my iPhone 4, iOS 6.1, bug is still there). Anyway I had a solution for that, maybe it could solve your problem too.
Check my answer here

- 1
- 1

- 6,014
- 3
- 28
- 55
when you scroll the picker view at that time value didn't change after successfull scrolling means didFinishScroll only it takes the value.below method will call after scroll completion.
In your case:
in the middle of the scroll your are performing some other operation that's why it gives the wrong value(it takes previous value).
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
}