madjid / MMPickerView

An easy to use and customizable PickerView for your iOS app.
MIT License
237 stars 59 forks source link

Only execute completion when Done pressed. #3

Open marcusvmsa opened 10 years ago

marcusvmsa commented 10 years ago

When I select a row in MMPickerView the completion callback is executed. When I press Done too.

Is there any way to execute completion callback only when Done is pressed and not when select a row?

rusmanarief commented 10 years ago

yes. why is this the case. can someone look into this.

omarojo commented 10 years ago

It is happening.. at it actually changes the id selectedObject type class.. If you are using array of objects for the picker... every time the scroller changes selection, completion method gets called and selectedObject is an NSString, only after you press OK button you get your real selected object type.

ghophp commented 10 years ago

i see the @rodrigofontes fix, but, to make a more compliance with the actual code, my suggestion is to separate completion and selection, i will submit a pull request with the code in a few minutes..

cloudjanak commented 8 years ago

can you add demo of this.

arshadsk5 commented 5 years ago

Even i got same problem, how can we fix it ? Please help. Thanks in advance.