I am presently working with a uipickerview on a view. The picker has two components. First one will have years and the second one will have a list of names linked to that year. The problem is the values in the second component keep changing depending on the year. So i want to disable any movement or scrolling on the second component when the first component is moving. How do i freeze a component when one component is scrolling(spinning) in uipickerview. Any help will be appreciated
Hummm this could be solved if there were a method in the delegate that tells you when a component is gonna be scrolled right? So when your left (Years) component is gonna be scrolled the right (names) component stops.
A crazy approach that might work is to implement – touchesBegan:withEvent: and check if the touch position is inside the left component. if yes then stop the right component using [picker selectRow:aRow inComponent:1 animated:NO]; if no then it means the touch is somewhere else like the right component or surroundings.
I have tried putting it that way but did not work. When i tried to get the event when user taps on the component, the event is not getting fired. It is getting fired for the rest of the view. So i tried to put an overlay view on top of the component and send the events. This time it is getting called but the event is not getting sent to the picker(no movement). Please help me solve this