How do I reload any picker view?
Closed this issue · 15 comments
Is there a way to refresh number of rows?
For this particular library, you can use:
pickerView.tableView.reloadData()
ok, thanks
I can't call the reloadData Method:
If gives me a Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)'
with the code self.setsBpreset.tableView.reloadData()
Is there a way to call it?
Hi @y4nnick!
On the latest release I made tableView
a fileprivate property of PickerView
and forgot to add a method to expose the ability to reload the picker. I'll fix it and release a new version later today.
Thank you for reporting!
Thanks for the quick response and this cool custom view.
Looking forward to the new version!
@y4nnick You're welcome. I'm happy you liked it :)
Man, I'm really sorry but I can't release the version today as I said. Today was a big release day in my company and could not dig into it because of that (now is 12AM here and I just stopped working, hehe)
I'll release it early tomorrow.
Hey @y4nnick, it's deployed!
Sorry again for the delay. Please let me know if everything is working properly.
Thanks, i will test it today and let you know :)
I also cleaned the pod cache and tried to remove it from Podfile and inserting it again.
Thanks for your quick response! Now i have the right version.
Sadly the picker views still not reload correctly:
My Code for reseting:
pointsApreset.reloadPickerView()
setsApreset.reloadPickerView()
pointsBpreset.reloadPickerView()
setsBpreset.reloadPickerView()
pointsApreset.currentSelectedRow = 0
setsApreset.currentSelectedRow = 0
pointsBpreset.currentSelectedRow = 0
setsBpreset.currentSelectedRow = 0
I also tried it with
self.pointsApreset.setNeedsLayout or
self.pointsApreset.setNeedsDisplay
but still the same result.
It seems that the correct number gets selected (bold font) but the scrolling position doesn't get reseted.
@filipealva any ideas? :)
@y4nnick I'm not able to reproduce this issue :( can you provide a project with the example of this scenario so I can verify?
thanks