change color of UIPickerView programatically

Discussion in 'iOS Programming' started by manman, Sep 8, 2008.

  1. manman macrumors regular

    Aug 18, 2008
    I did several searches for this beforehand, so I'm sorry if this has been answered before, but I'm looking for a way to change the color of the UIPickerView's black border area if possible. the backgroundColor property wouldn't work for me, but I was wondering if there is something like the navigation bar's tint color property I could use.

  2. Sbrocket macrumors 65816


    Jun 3, 2007
    Changing the art of UIPickerView would be quite a task. If you notice, UIPickerView is constrained to a specific width and height because of the art. There certainly is no easy way to change the color, which is probably what you're looking for, and I have a feeling that the "easiest" way of changing the color would require delving into undocumented methods and classes in UIKit (of which there are many associated with UIPickerView).
  3. manman thread starter macrumors regular

    Aug 18, 2008
    yikes... thanks for the response. I wasn't able to do it through code, so basically what I ended up doing was just taking a screenshot and cutting out the part I wanted to color so I could manipulate it in photoshop. Then I just used a UIImageView and placed it over the picker. I got the effect I wanted, so that's good- but I do wish you could just change the tint color like you can for the navigation bar.
  4. manraj macrumors newbie

    May 4, 2008
    hi manman, could you please tell me how you are using UIImageView as overlay view to the UIPickerView? I want to change the background color to my theme screen. It helps me a lot.

Share This Page