How to change UIPicker Color ? iPhone

前端 未结 6 906
走了就别回头了
走了就别回头了 2020-12-30 17:35

I have observed that UIPicker always remains in black color,

Is there any way to change the color of UIPicker & it\'s Selection Indicator?

Thanks for hel

6条回答
  •  臣服心动
    2020-12-30 18:39

    You can do this by adding 5 ImageView also. First one is of size "Selection Indicator" and put it exactly over "Selection Indicator". Now change that imageView's alpha to 0.2 or whatever you want and also add image/color as per your choice. Now, you will see your custom "Selection Indicator". Also, same thing you can do for borders. Add each imageView to four sides of pickerview and make it's size equal to border size. Now fill the images/color you want in that ImageView.

提交回复
热议问题