自定义UIPickerView和自定义背景颜色 [英] Custom UIPickerView with Custom Background color

查看:1250
本文介绍了自定义UIPickerView和自定义背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个示例选择器视图,它将显示一些详细信息。使用以下设置背景颜色:

I have created a sample picker-view which will display some details. Setting the Background color using:

_pickerView.backgroundColor = [UIColor redColor]; 

似乎不起作用。但我希望我可以创建一个选择器视图,如下图所示

doesn't seems to be working . But I wish I could create a picker view like the below image

我想要做的是,整个PickerView背景颜色不应该是白色的,应该填充 UIColor 。那可能吗??如何做?

What I was trying to do is , the entire PickerView background color should not be white, it should fill with the UIColor which I am giving. Is that possible?? How it can be done ??

推荐答案

除了Nina的回答,下面是一些好的自定义选择器视图控件良好的性能和可自定义。

Addition to Nina's answer, below are some of the good custom Picker view controls which will be good to use in terms of performance and customizable.


  1. http://www.cocoacontrols.com/platforms/ios/controls/cppickerview

  2. http://www.cocoacontrols.com/platforms/ios/controls/afpickerview

  3. http://www.cocoacontrols.com/platforms/ios/controls/v8horizo​​ntalpickerview (Horizo​​ntal PickerView)

  1. http://www.cocoacontrols.com/platforms/ios/controls/cppickerview
  2. http://www.cocoacontrols.com/platforms/ios/controls/afpickerview
  3. http://www.cocoacontrols.com/platforms/ios/controls/v8horizontalpickerview (Horizontal PickerView)

这篇关于自定义UIPickerView和自定义背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆