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
I am presently working with a uipickerview on a view. The picker has two
Share
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.