Darkseal / DownPicker

A lightweight DropDownList / ComboBox for iOS, written in Objective-C
MIT License
202 stars 93 forks source link

After set selected element to 0 it shows placeholder instead of element from array #20

Closed viktorchukhantsev closed 9 years ago

viktorchukhantsev commented 9 years ago

After set selected element to 0 it shows placeholder instead of element from array.

[self.downPicker setSelectedIndex:0];

but

[self.downPicker getValueAtIndex:0];

returns right value

Darkseal commented 9 years ago

0.1.30 should fix this issue for good.

Notice that the behaviour of setSelectedIndex changed, now you must use -1 instead of nil to clear the selection. I was force to modify that because nil evaluates to 0 in Objective-C (that was the source of your initial issue). Hope the fix will work for you.