madjid / MMPickerView

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

Crash on dismiss #1

Open marcllucia opened 10 years ago

marcllucia commented 10 years ago

Whenever I try to dismiss the picker the app crashes. It seems the problem is in this line:

callBack([self selectedObject]);

madjid commented 10 years ago

Thanks for the feedback, I will look into it and get back to you.

One question, how are you dismissing the control? Could you please show me the code you're using?

marcllucia commented 10 years ago

I just use the function +(void)dismissWithCompletion: (void(^)(NSString *))completion;

marcllucia commented 10 years ago

It crashes on the sample project too!

ashchan commented 10 years ago

@marcllucia , @madjid I think the issue is different objects are passing to the completion block when a row is selected or 'done' is pressed. The first passes the selected string (by calling the supplied convert to string block) while the latter passes the actual selected object.