Guille10k
Guille10k

Reputation: 11

table to updated after selection with uipicker

An UIPicker shows up when I select a row in a table, so I can choose some things I want to be displayed on the same row.

How can I update the table once I finished with the uipicker? I used reloadData right after the call to the picker, but the code is executed before I do "Done" on the picker.

Some idea?

Thank u

Upvotes: 0

Views: 515

Answers (1)

Paul Lynch
Paul Lynch

Reputation: 19789

USe the UIPicker delegate method pickerView:didSelectRow:inComponent:, and call reloadData from your delegate.

The object with your "done" action should be the delegate of the UIPicker, and implement the delegate method above. In that delegate method call reloadData. It will be called when the picker is done.

Upvotes: 1

Related Questions