Hi
I want to change the border color of a UIPickerView. I do not see a tint property for the UIPickerView. Is there any way this could be done? Or a workaround?
Thanks.
Hi
I want to change the border color of a UIPickerView. I do not see a tint property for the UIPickerView. Is there any way this could be done? Or a workaround?
Thanks.
If you just want a workaround, take a screen shot in the simulator, open it in photoshop, crop it to just the UIPickerView area, make the center transparent, apply whatever tint you want, add that image to your project, and add it as a UIImageView on top of the UIPickerView.
hey u cannot subview the UIPickerview please suggest some other way
This suggestion actually is a good work around - the only thing is you need to create left, right, top, bottom images to overlay the UIPickerView so the picker is still selectable. Otherwise you will mask it so it cannot be accessed.
My UIPickerView has 3 components. And no Selection Indicator.
This gives it 11 subviews. [[picker subviews] count]
Hiding the first and the last subview totally removes the background.
[(UIView*)[[picker subviews] objectAtIndex:0] setHidden:YES]; [(UIView*)[[picker subviews] objectAtIndex:10] setHidden:YES];
Hiding every third other subview (indexes 1, 4 and 7) hides the opaque background on the components. Giving quite a nice effect that I can skin as I desire.
Hope that helps someone :)
Actualy to correct you, you actualy can put a .png ontop of the UIPickerview and still use the Picker View, just make sure the middle is transparent or you won't see the rows.