I am trying to make an app with a UIPickerView and UITableView on the same view. I have the PickerView done and it works. But, I can’t figure out how to connect the PickerView generated results to the tableView at the bottom of the view. The Picker iterates through user selected variables and I want the tableview to be populated with the results from the picker. Any assistance would be appreciated.
Share
I solved the problem. Thanks to Sukas and many hours of hard work.
How did I add a UITableView to a UIPickerView on the same view.
First I made a UIViewController with no nib. I made the UIPickerView and UITableView programmatically in -(void)loadView.
PickerView and TableView were made into subviews of the UIView.
Important Part: In the DidSelectRow in Component method — I added [self.table reloadData];
(This is the way I found to get the arrays from my component methods into my tableView methods)
Also, In the DidSelectRow in Component method I removed all objects from the arrays I created to hold the wheel selections. I made two arrays to hold the wheel selections and at different parts of the code I had to removeAllObjects from them, so that I got a new empty array every time the wheel changed and the tableview could be repopulated with new information.
I hope this helps!!!