Ramel singh Rana
Ramel singh Rana

Reputation: 61

Uipicker Background color

I need help to change the background color of UIPicker in the center not border of picker with any specific image instead of default light sky blue background color. And i also want to change light transparent color strip which showing the selection of the picker value.

Thanks Rana

Upvotes: 0

Views: 1411

Answers (2)

palaniraja
palaniraja

Reputation: 10492

There is an example provided by Apple - UICatalog Intro look at custom tab of pickers.

Basically you need to style the view

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

Also have a look at ALPickerView could be useful if apple doc didn't help.

For the style of border, you better use image on top of picker, thats how i solved once.

HIH

Upvotes: 0

DarkDust
DarkDust

Reputation: 92442

I'm not sure what you mean with blue background color, but there's few things you can change on the UIPicker. To change the appearance of the selector, you have to disable it and draw it yourself. And that's about it, you can't tweak its colors other than that.

Edit: Found a question that suggests a workaround to do some custom coloring.

Upvotes: 1

Related Questions