1
votes

Im trying to create a view with two pickers, each with multiple components, one of the pickers has 4 components that are all text based, the other has two components that need to display graphics and two that need to display text. Is there any way to use the pickerView:titleForRow:forComponent:(NSInteger)component delegate method and the pickerView:viewForRow:forComponent:reusingView: delegate method for the same picker? I've implemented both, only the viewForRow one seems to ever get called. Do I need to just use that one and create a view with a label for each row?

2

2 Answers

1
votes

You can create one picker, yes, or you can implement one common method for both pickers and determine what picker is calling it by checking it's tag.

0
votes

The Solution I cam up with was to call pickerView:titleForRow:forComponent: from pickerView:viewForRow:forComponent:reusingView: and create a UILabel with the string from the first method. It works, but it seems like there ought to be a better way.