Iphone uipickerview: image and text

Is it possible to have an image (for example, an icon) next to the text in UIPickerView

I saw examples UIPickerViewswith two columns: one with an image and the other with text. this is not what i need, i need to have one column with text and images

Thank.

+3
source share
1 answer

You will need to create your own view for each row of the collector. It is easy enough if it is just UIImageView and UILabel. You can then pass the view to your collector using this UIPickerViewDelegate method.

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view

+2
source

All Articles